@feedmepos/mf-payment 1.0.15 → 1.0.16-beta.1
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/{PayoutAccount-BmladAUo.js → PayoutAccount-6es5M8rA.js} +122 -121
- package/dist/{PayoutAccount-_eib40vg.js → PayoutAccount-BLnAnrdL.js} +5 -5
- package/dist/{PayoutAccountSelector.vue_vue_type_script_setup_true_lang-Bf87p0sW.js → PayoutAccountSelector.vue_vue_type_script_setup_true_lang-Cfkyp9mf.js} +2 -2
- package/dist/{PayoutAccountSetting-B7oB88aM.js → PayoutAccountSetting-BmqsY0rS.js} +4 -4
- package/dist/{Restaurant-DAd8a0Sf.js → Restaurant-BYlL_o6q.js} +4 -4
- package/dist/{RestaurantSetting-D7e6rowL.js → RestaurantSetting-Cj1hxkIg.js} +4 -4
- package/dist/{Settlement-CyLRDyAQ.js → Settlement-B5kB8Fnq.js} +3 -3
- package/dist/{Settlement-DpUcTPxB.js → Settlement-Nq0i8Jkq.js} +3 -3
- package/dist/{SettlementTransactions-isJ-omim.js → SettlementTransactions-C7L0siVw.js} +4 -4
- package/dist/{SettlementTransactions-D5ERmwWf.js → SettlementTransactions-D4utbC0A.js} +4 -4
- package/dist/{Terminal-D24nWj0d.js → Terminal-CDQJ9wy0.js} +5 -5
- package/dist/{TerminalSetting-BHDaUrn0.js → TerminalSetting-BgFe3rKb.js} +3 -3
- package/dist/TerminalTransaction-BSjwDhBv.js +820 -0
- package/dist/{TerminalTransaction-COAbt4U6.js → TerminalTransaction-CnQmbEoQ.js} +130 -107
- package/dist/{Transaction-BO92b-MM.js → Transaction-CAzMLsJt.js} +5 -5
- package/dist/{Transaction-C7NFK_yP.js → Transaction-CV2ymNDx.js} +6 -6
- package/dist/{TransactionOld-BOyHbhbK.js → TransactionOld-CgLoRexV.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-9oqYe9SK.js → TransactionTable.vue_vue_type_script_setup_true_lang-CktM2jzP.js} +2 -2
- package/dist/{app-DjXKH0db.js → app-Ci-Vcr4m.js} +219 -219
- package/dist/app.js +1 -1
- package/dist/{assets-Cy96qAKJ.js → assets-FkjGSBQ1.js} +1 -1
- package/dist/{grafana-B-S5S_95.js → grafana-931Nxkhi.js} +12 -12
- package/dist/{index-CblSdE4I.js → index-BcCZ_0v0.js} +2 -2
- package/dist/{index-CpBwYTvQ.js → index-BgRAawwk.js} +1 -1
- package/dist/{index--T9htMAt.js → index-C6keHWJr.js} +1 -1
- package/dist/{index-CPyo7PsK.js → index-CBBlXAaP.js} +1 -1
- package/dist/{index-DYrMKMaP.js → index-CTyGGtdE.js} +1 -1
- package/dist/{index-DdE2XkaV.js → index-CUiFh1mv.js} +1 -1
- package/dist/{index-CVqUPJke.js → index-CoZV8mxc.js} +1 -1
- package/dist/{index-CRe278b0.js → index-DGdWaUJP.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-UgxsCvVC.js → index.vue_vue_type_script_setup_true_lang-ooSmpomb.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-yEBg2kyi.js → payout-account-CGdTzV98.js} +2 -2
- package/dist/{transaction-CxzGTmkG.js → transaction-2NjSBj5U.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/TerminalTransaction-BNUnpt1O.js +0 -819
@@ -1,10 +1,10 @@
|
|
1
1
|
import { defineComponent as f, ref as I, reactive as J, computed as Z, watch as N, resolveComponent as Y, openBlock as n, createBlock as u, withCtx as Q, createElementVNode as r, createVNode as i, unref as w, createCommentVNode as O, createElementBlock as U, normalizeClass as h, toDisplayString as k, h as y, onMounted as R, Fragment as T } from "vue";
|
2
|
-
import { p } from "./index-
|
3
|
-
import { _ as z, u as L, e as S } from "./index-
|
2
|
+
import { p } from "./index-CUiFh1mv.js";
|
3
|
+
import { _ as z, u as L, e as S } from "./index-BcCZ_0v0.js";
|
4
4
|
import { defineStore as _ } from "pinia";
|
5
5
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
6
|
-
import { c as AA, P as W } from "./payout-account-
|
7
|
-
import { useDialogChild as
|
6
|
+
import { c as AA, P as W } from "./payout-account-CGdTzV98.js";
|
7
|
+
import { useDialogChild as eA, useDialog as sA } from "@feedmepos/ui-library";
|
8
8
|
import { z as X, a as x } from "./validator-D5jtpt9A.js";
|
9
9
|
import { P as K } from "./PDFViewer-xrBtzrlR.js";
|
10
10
|
import { _ as tA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
@@ -16,17 +16,17 @@ function aA() {
|
|
16
16
|
const gA = _("mf-payment-payoutAccount", {
|
17
17
|
state: () => aA(),
|
18
18
|
getters: {
|
19
|
-
getBusinessPayoutAccounts: (
|
19
|
+
getBusinessPayoutAccounts: (t) => t.businessPayoutAccounts
|
20
20
|
},
|
21
21
|
actions: {
|
22
22
|
async readBusinessPayoutAccounts() {
|
23
23
|
this.businessPayoutAccounts = await p.readBusinessPayoutAccounts();
|
24
24
|
},
|
25
|
-
async updateBusinessPayoutAccounts(
|
26
|
-
await p.updateBusinessPayoutAccounts(
|
25
|
+
async updateBusinessPayoutAccounts(t, o) {
|
26
|
+
await p.updateBusinessPayoutAccounts(t, o);
|
27
27
|
},
|
28
|
-
async createBusinessPayoutAccounts(
|
29
|
-
const o = await p.createBusinessPayoutAccounts(
|
28
|
+
async createBusinessPayoutAccounts(t) {
|
29
|
+
const o = await p.createBusinessPayoutAccounts(t);
|
30
30
|
this.businessPayoutAccounts.push(o);
|
31
31
|
}
|
32
32
|
}
|
@@ -69,42 +69,42 @@ const gA = _("mf-payment-payoutAccount", {
|
|
69
69
|
required: !0
|
70
70
|
}
|
71
71
|
},
|
72
|
-
setup(
|
73
|
-
const o =
|
74
|
-
function b(
|
75
|
-
|
72
|
+
setup(t) {
|
73
|
+
const o = t, g = eA(), m = I(), e = J(AA(o.initialValue)), G = I([e.payoutSetting.store.ssm, e.payoutSetting.store.bankStatement, e.payoutSetting.store.exteriorPhoto].every((a) => a)), d = I(e.payoutSetting.store.ssm), s = I(e.payoutSetting.store.bankStatement), B = Z(() => e.newExteriorPhoto ? URL.createObjectURL(e.newExteriorPhoto) : e.payoutSetting.store.exteriorPhoto ? e.payoutSetting.store.exteriorPhoto : "");
|
74
|
+
function b(a) {
|
75
|
+
e.newExteriorPhoto = a, e.newExteriorPhoto || (e.payoutSetting.store.exteriorPhoto = "");
|
76
76
|
}
|
77
|
-
async function C(
|
77
|
+
async function C(a) {
|
78
78
|
const A = new FileReader();
|
79
79
|
return new Promise((V) => {
|
80
80
|
A.onload = (E) => {
|
81
81
|
var M;
|
82
82
|
V((M = E.target) == null ? void 0 : M.result);
|
83
|
-
}, A.readAsDataURL(
|
83
|
+
}, A.readAsDataURL(a);
|
84
84
|
});
|
85
85
|
}
|
86
|
-
async function q(
|
87
|
-
|
88
|
-
const A =
|
89
|
-
|
86
|
+
async function q(a) {
|
87
|
+
e.newBankStatement = a;
|
88
|
+
const A = a ? await C(a) : "";
|
89
|
+
s.value = A;
|
90
90
|
}
|
91
|
-
async function F(
|
92
|
-
|
93
|
-
const A =
|
91
|
+
async function F(a) {
|
92
|
+
e.newSSM = a;
|
93
|
+
const A = a ? await C(a) : "";
|
94
94
|
d.value = A;
|
95
95
|
}
|
96
96
|
function l() {
|
97
|
-
g.emitData(
|
97
|
+
g.emitData(e), g.emitAction("primary");
|
98
98
|
}
|
99
|
-
return N(() =>
|
100
|
-
|
101
|
-
}, { immediate: !0 }), N(() => [
|
102
|
-
G.value =
|
103
|
-
}), (
|
99
|
+
return N(() => e.payoutSetting.store.event, (a) => {
|
100
|
+
e.payoutSetting.notifyUrl = a === z.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment";
|
101
|
+
}, { immediate: !0 }), N(() => [e.newSSM, e.newBankStatement, e.newExteriorPhoto], (a) => {
|
102
|
+
G.value = a.every((A) => A);
|
103
|
+
}), (a, A) => {
|
104
104
|
const V = Y("FmSelect"), E = Y("FmTextField"), M = Y("FmPhoneNumber"), v = Y("FmDropField"), H = Y("FmButton"), j = Y("FmFormGroup"), D = Y("FmForm");
|
105
105
|
return n(), u(D, {
|
106
106
|
ref: m.value,
|
107
|
-
disabled: !
|
107
|
+
disabled: !t.isNewAccount && !t.isUpdateAccount,
|
108
108
|
class: "flex flex-col gap-16",
|
109
109
|
onValidationSuccess: l
|
110
110
|
}, {
|
@@ -117,21 +117,21 @@ const gA = _("mf-payment-payoutAccount", {
|
|
117
117
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
118
118
|
], -1)),
|
119
119
|
i(V, {
|
120
|
-
modelValue:
|
121
|
-
"onUpdate:modelValue": A[0] || (A[0] = (c) =>
|
120
|
+
modelValue: e.payoutSetting.store.event,
|
121
|
+
"onUpdate:modelValue": A[0] || (A[0] = (c) => e.payoutSetting.store.event = c),
|
122
122
|
label: "Type",
|
123
123
|
"label-mark": "required",
|
124
|
-
disabled: !
|
125
|
-
items:
|
124
|
+
disabled: !t.isNewAccount || t.isUpdateAccount,
|
125
|
+
items: t.storeEventOptions
|
126
126
|
}, null, 8, ["modelValue", "disabled", "items"]),
|
127
127
|
i(V, {
|
128
|
-
modelValue:
|
129
|
-
"onUpdate:modelValue": A[1] || (A[1] = (c) =>
|
128
|
+
modelValue: e.payoutSetting.store.id,
|
129
|
+
"onUpdate:modelValue": A[1] || (A[1] = (c) => e.payoutSetting.store.id = c),
|
130
130
|
label: "For",
|
131
131
|
"label-mark": "required",
|
132
132
|
placeholder: "Select store",
|
133
|
-
disabled: !
|
134
|
-
items:
|
133
|
+
disabled: !t.isNewAccount || t.isUpdateAccount,
|
134
|
+
items: e.payoutSetting.store.event === w(z.F_PAYOUT_FOR).Enum.ORDERING ? t.restaurantOptions : t.businessOptions,
|
135
135
|
rules: w(X)(w(x).string().min(1))
|
136
136
|
}, null, 8, ["modelValue", "disabled", "items", "rules"]),
|
137
137
|
A[15] || (A[15] = r("div", { class: "flex items-center my-8" }, [
|
@@ -140,29 +140,30 @@ const gA = _("mf-payment-payoutAccount", {
|
|
140
140
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
141
141
|
], -1)),
|
142
142
|
i(V, {
|
143
|
-
modelValue:
|
144
|
-
"onUpdate:modelValue": A[2] || (A[2] = (c) =>
|
143
|
+
modelValue: e.payoutSetting.store.bank.name,
|
144
|
+
"onUpdate:modelValue": A[2] || (A[2] = (c) => e.payoutSetting.store.bank.name = c),
|
145
145
|
label: "Bank",
|
146
146
|
"label-mark": "required",
|
147
|
-
items:
|
147
|
+
items: t.bankNameOptions,
|
148
148
|
rules: w(X)(w(x).string().min(1))
|
149
149
|
}, null, 8, ["modelValue", "items", "rules"]),
|
150
150
|
i(V, {
|
151
|
-
"model-value": ((P =
|
151
|
+
"model-value": ((P = e.payoutSetting.store.bank) == null ? void 0 : P.type) ?? null,
|
152
152
|
label: "Type",
|
153
153
|
"label-mark": "required",
|
154
|
-
items:
|
154
|
+
items: t.bankTypeOptions
|
155
155
|
}, null, 8, ["model-value", "items"]),
|
156
156
|
i(E, {
|
157
|
-
modelValue:
|
158
|
-
"onUpdate:modelValue": A[3] || (A[3] = (c) =>
|
157
|
+
modelValue: e.payoutSetting.store.bank.accountNumber,
|
158
|
+
"onUpdate:modelValue": A[3] || (A[3] = (c) => e.payoutSetting.store.bank.accountNumber = c),
|
159
159
|
label: "Account Number",
|
160
160
|
"label-mark": "required",
|
161
|
+
type: "number",
|
161
162
|
rules: w(X)(w(x).string().min(1))
|
162
163
|
}, null, 8, ["modelValue", "rules"]),
|
163
164
|
i(E, {
|
164
|
-
modelValue:
|
165
|
-
"onUpdate:modelValue": A[4] || (A[4] = (c) =>
|
165
|
+
modelValue: e.payoutSetting.store.bank.holderName,
|
166
|
+
"onUpdate:modelValue": A[4] || (A[4] = (c) => e.payoutSetting.store.bank.holderName = c),
|
166
167
|
label: "Holder name",
|
167
168
|
"label-mark": "required",
|
168
169
|
rules: w(X)(w(x).string().min(1))
|
@@ -173,23 +174,23 @@ const gA = _("mf-payment-payoutAccount", {
|
|
173
174
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
174
175
|
], -1)),
|
175
176
|
i(E, {
|
176
|
-
modelValue:
|
177
|
-
"onUpdate:modelValue": A[5] || (A[5] = (c) =>
|
177
|
+
modelValue: e.payoutSetting.store.keyPerson.name,
|
178
|
+
"onUpdate:modelValue": A[5] || (A[5] = (c) => e.payoutSetting.store.keyPerson.name = c),
|
178
179
|
label: "Name",
|
179
180
|
"label-mark": "required",
|
180
181
|
rules: w(X)(w(x).string().min(1))
|
181
182
|
}, null, 8, ["modelValue", "rules"]),
|
182
183
|
i(M, {
|
183
|
-
modelValue:
|
184
|
-
"onUpdate:modelValue": A[6] || (A[6] = (c) =>
|
184
|
+
modelValue: e.payoutSetting.store.keyPerson.phone,
|
185
|
+
"onUpdate:modelValue": A[6] || (A[6] = (c) => e.payoutSetting.store.keyPerson.phone = c),
|
185
186
|
"default-country": "MY",
|
186
187
|
label: "Phone No",
|
187
188
|
"label-mark": "required",
|
188
189
|
rules: w(X)(w(x).string().min(7))
|
189
190
|
}, null, 8, ["modelValue", "rules"]),
|
190
191
|
i(E, {
|
191
|
-
modelValue:
|
192
|
-
"onUpdate:modelValue": A[7] || (A[7] = (c) =>
|
192
|
+
modelValue: e.payoutSetting.store.keyPerson.email,
|
193
|
+
"onUpdate:modelValue": A[7] || (A[7] = (c) => e.payoutSetting.store.keyPerson.email = c),
|
193
194
|
label: "Email",
|
194
195
|
inputmode: "email",
|
195
196
|
"label-mark": "required",
|
@@ -200,18 +201,18 @@ const gA = _("mf-payment-payoutAccount", {
|
|
200
201
|
r("span", { class: "text-left mx-6 text-gray-500" }, "Legal Documents"),
|
201
202
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
202
203
|
], -1)),
|
203
|
-
|
204
|
+
t.isNewAccount && B.value === "" ? (n(), u(v, {
|
204
205
|
key: 0,
|
205
206
|
class: "h-[300px] w-full",
|
206
207
|
label: "Exterior Photo",
|
207
208
|
"label-mark": "required",
|
208
209
|
accept: ".png,.jpg,.jpeg,.webp",
|
209
|
-
disabled: !
|
210
|
+
disabled: !t.isNewAccount,
|
210
211
|
onFileUpload: b
|
211
212
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
212
213
|
key: 1,
|
213
|
-
modelValue:
|
214
|
-
"onUpdate:modelValue": A[9] || (A[9] = (c) =>
|
214
|
+
modelValue: s.value,
|
215
|
+
"onUpdate:modelValue": A[9] || (A[9] = (c) => s.value = c),
|
215
216
|
label: "Exterior Photo"
|
216
217
|
}, {
|
217
218
|
default: Q(() => [
|
@@ -219,7 +220,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
219
220
|
class: "h-[300px] w-full",
|
220
221
|
src: B.value
|
221
222
|
}, null, 8, rA),
|
222
|
-
|
223
|
+
t.isNewAccount ? (n(), u(H, {
|
223
224
|
key: 0,
|
224
225
|
variant: "tertiary",
|
225
226
|
label: "Remove",
|
@@ -230,28 +231,28 @@ const gA = _("mf-payment-payoutAccount", {
|
|
230
231
|
]),
|
231
232
|
_: 1
|
232
233
|
}, 8, ["modelValue"])),
|
233
|
-
|
234
|
+
t.isNewAccount && s.value === "" ? (n(), u(v, {
|
234
235
|
key: 2,
|
235
236
|
class: "h-[300px] w-full",
|
236
237
|
label: "Bank Statement w/ Holder Name",
|
237
238
|
"label-mark": "required",
|
238
239
|
accept: ".pdf",
|
239
|
-
disabled: !
|
240
|
+
disabled: !t.isNewAccount,
|
240
241
|
onFileUpload: q
|
241
242
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
242
243
|
key: 3,
|
243
|
-
modelValue:
|
244
|
-
"onUpdate:modelValue": A[11] || (A[11] = (c) =>
|
244
|
+
modelValue: s.value,
|
245
|
+
"onUpdate:modelValue": A[11] || (A[11] = (c) => s.value = c),
|
245
246
|
label: "Bank Statement w/ Holder Name"
|
246
247
|
}, {
|
247
248
|
default: Q(() => [
|
248
249
|
i(K, {
|
249
250
|
height: 300,
|
250
|
-
pdf:
|
251
|
+
pdf: s.value,
|
251
252
|
"disable-text-layer": !0,
|
252
253
|
"disable-annotation-layer": !0
|
253
254
|
}, null, 8, ["pdf"]),
|
254
|
-
|
255
|
+
t.isNewAccount ? (n(), u(H, {
|
255
256
|
key: 0,
|
256
257
|
variant: "tertiary",
|
257
258
|
label: "Remove",
|
@@ -262,13 +263,13 @@ const gA = _("mf-payment-payoutAccount", {
|
|
262
263
|
]),
|
263
264
|
_: 1
|
264
265
|
}, 8, ["modelValue"])),
|
265
|
-
|
266
|
+
t.isNewAccount && d.value === "" ? (n(), u(v, {
|
266
267
|
key: 4,
|
267
268
|
class: "w-full h-[300px]",
|
268
269
|
label: "SSM Certificate ( Form D )",
|
269
270
|
"label-mark": "required",
|
270
271
|
accept: ".pdf",
|
271
|
-
disabled: !
|
272
|
+
disabled: !t.isNewAccount,
|
272
273
|
onFileUpload: F
|
273
274
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
274
275
|
key: 5,
|
@@ -283,7 +284,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
283
284
|
"disable-text-layer": !0,
|
284
285
|
"disable-annotation-layer": !0
|
285
286
|
}, null, 8, ["pdf"]),
|
286
|
-
|
287
|
+
t.isNewAccount ? (n(), u(H, {
|
287
288
|
key: 0,
|
288
289
|
variant: "tertiary",
|
289
290
|
label: "Remove",
|
@@ -294,7 +295,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
294
295
|
]),
|
295
296
|
_: 1
|
296
297
|
}, 8, ["modelValue"])),
|
297
|
-
|
298
|
+
t.isNewAccount ? (n(), U("div", oA, [
|
298
299
|
i(H, {
|
299
300
|
type: "submit",
|
300
301
|
disabled: !G.value,
|
@@ -315,12 +316,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
315
316
|
row: {},
|
316
317
|
data: {}
|
317
318
|
},
|
318
|
-
setup(
|
319
|
-
const o =
|
319
|
+
setup(t) {
|
320
|
+
const o = t;
|
320
321
|
function g() {
|
321
322
|
return o.data === "NEW" ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === "PENDING" ? "!w-[16px] !h-[16px] bg-red-400" : "!w-[16px] !h-[16px] bg-green-400";
|
322
323
|
}
|
323
|
-
return (m,
|
324
|
+
return (m, e) => {
|
324
325
|
const G = Y("FmBadge");
|
325
326
|
return n(), u(G, {
|
326
327
|
inline: "",
|
@@ -339,15 +340,15 @@ const gA = _("mf-payment-payoutAccount", {
|
|
339
340
|
row: {},
|
340
341
|
data: {}
|
341
342
|
},
|
342
|
-
setup(
|
343
|
-
const o =
|
343
|
+
setup(t) {
|
344
|
+
const o = t;
|
344
345
|
function g() {
|
345
346
|
return o.data ? "#66BB6A" : "#EF5350";
|
346
347
|
}
|
347
348
|
function m() {
|
348
349
|
return o.data ? "check" : "close";
|
349
350
|
}
|
350
|
-
return (
|
351
|
+
return (e, G) => {
|
351
352
|
const d = Y("FmIcon");
|
352
353
|
return n(), u(d, {
|
353
354
|
name: m(),
|
@@ -362,12 +363,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
362
363
|
row: {},
|
363
364
|
data: {}
|
364
365
|
},
|
365
|
-
setup(
|
366
|
+
setup(t) {
|
366
367
|
function o(g) {
|
367
368
|
return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
368
369
|
}
|
369
370
|
return (g, m) => {
|
370
|
-
const
|
371
|
+
const e = Y("FmBadge"), G = Y("FmListItem");
|
371
372
|
return n(), u(G, {
|
372
373
|
label: g.row.original.holderName,
|
373
374
|
sublabel: g.row.original.bankName + " - " + g.row.original.bankNumber,
|
@@ -375,7 +376,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
375
376
|
tag: "label"
|
376
377
|
}, {
|
377
378
|
append: Q(() => [
|
378
|
-
i(
|
379
|
+
i(e, {
|
379
380
|
inline: "",
|
380
381
|
class: h(o(g.row.original.bankReady))
|
381
382
|
}, null, 8, ["class"])
|
@@ -390,12 +391,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
390
391
|
row: {},
|
391
392
|
data: {}
|
392
393
|
},
|
393
|
-
setup(
|
394
|
+
setup(t) {
|
394
395
|
function o(g) {
|
395
396
|
return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
396
397
|
}
|
397
398
|
return (g, m) => {
|
398
|
-
const
|
399
|
+
const e = Y("FmBadge"), G = Y("FmListItem");
|
399
400
|
return n(), u(G, {
|
400
401
|
label: g.row.original.picName,
|
401
402
|
sublabel: g.row.original.picEmail + " - " + g.row.original.picPhone,
|
@@ -403,7 +404,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
403
404
|
tag: "label"
|
404
405
|
}, {
|
405
406
|
append: Q(() => [
|
406
|
-
i(
|
407
|
+
i(e, {
|
407
408
|
inline: "",
|
408
409
|
class: h(o(g.row.original.picReady))
|
409
410
|
}, null, 8, ["class"])
|
@@ -425,8 +426,8 @@ const gA = _("mf-payment-payoutAccount", {
|
|
425
426
|
}
|
426
427
|
},
|
427
428
|
emits: ["row-click"],
|
428
|
-
setup(
|
429
|
-
const g =
|
429
|
+
setup(t, { emit: o }) {
|
430
|
+
const g = t, m = o, e = I(""), G = [
|
430
431
|
{
|
431
432
|
header: () => "Type",
|
432
433
|
accessorKey: "event",
|
@@ -441,7 +442,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
441
442
|
{
|
442
443
|
header: () => "Status",
|
443
444
|
accessorKey: "status",
|
444
|
-
cell: ({ cell:
|
445
|
+
cell: ({ cell: s, row: B }) => y(lA, { row: B, data: s.getValue() }),
|
445
446
|
meta: {
|
446
447
|
maxWidth: "108px"
|
447
448
|
}
|
@@ -452,30 +453,30 @@ const gA = _("mf-payment-payoutAccount", {
|
|
452
453
|
meta: {
|
453
454
|
maxWidth: "64px"
|
454
455
|
},
|
455
|
-
cell: ({ cell:
|
456
|
+
cell: ({ cell: s, row: B }) => y(cA, { row: B, data: s.getValue() })
|
456
457
|
},
|
457
458
|
{
|
458
459
|
header: () => "Bank Details",
|
459
460
|
accessorKey: "bank",
|
460
|
-
cell: ({ cell:
|
461
|
+
cell: ({ cell: s, row: B }) => y(nA, { row: B, data: s.getValue() })
|
461
462
|
},
|
462
463
|
{
|
463
464
|
header: () => "Person In-Charge (PIC)",
|
464
465
|
accessorKey: "pic",
|
465
|
-
cell: ({ cell:
|
466
|
+
cell: ({ cell: s, row: B }) => y(wA, { row: B, data: s.getValue() })
|
466
467
|
}
|
467
|
-
], d = Z(() => g.data.map((
|
468
|
+
], d = Z(() => g.data.map((s) => {
|
468
469
|
const B = {
|
469
470
|
bankReady: !1,
|
470
471
|
bankNumber: "",
|
471
472
|
bankName: "",
|
472
473
|
holderName: ""
|
473
474
|
};
|
474
|
-
|
475
|
+
s.store.bank && s.store.bank.accountNumber && Object.assign(B, {
|
475
476
|
bankReady: !0,
|
476
|
-
bankNumber:
|
477
|
-
bankName:
|
478
|
-
holderName:
|
477
|
+
bankNumber: s.store.bank.accountNumber,
|
478
|
+
bankName: s.store.bank.name,
|
479
|
+
holderName: s.store.bank.holderName
|
479
480
|
});
|
480
481
|
const b = {
|
481
482
|
picReady: !1,
|
@@ -483,28 +484,28 @@ const gA = _("mf-payment-payoutAccount", {
|
|
483
484
|
picPhone: "",
|
484
485
|
picEmail: ""
|
485
486
|
};
|
486
|
-
|
487
|
+
s.store.keyPerson && Object.assign(b, {
|
487
488
|
picReady: !0,
|
488
|
-
picName:
|
489
|
-
picPhone:
|
490
|
-
picEmail:
|
489
|
+
picName: s.store.keyPerson.name,
|
490
|
+
picPhone: s.store.keyPerson.phone,
|
491
|
+
picEmail: s.store.keyPerson.email
|
491
492
|
});
|
492
|
-
let C =
|
493
|
-
return
|
494
|
-
_id:
|
495
|
-
event:
|
493
|
+
let C = s.ref.name;
|
494
|
+
return s.store.event === "ORDERING" && (C = s.ref.profile.name), {
|
495
|
+
_id: s._id,
|
496
|
+
event: s.store.event,
|
496
497
|
name: C,
|
497
|
-
status:
|
498
|
-
isActive:
|
498
|
+
status: s.status,
|
499
|
+
isActive: s.enable,
|
499
500
|
...B,
|
500
501
|
...b
|
501
502
|
};
|
502
503
|
}));
|
503
|
-
return (
|
504
|
+
return (s, B) => {
|
504
505
|
const b = Y("FmTable");
|
505
506
|
return n(), u(b, {
|
506
|
-
modelValue:
|
507
|
-
"onUpdate:modelValue": B[0] || (B[0] = (C) =>
|
507
|
+
modelValue: e.value,
|
508
|
+
"onUpdate:modelValue": B[0] || (B[0] = (C) => e.value = C),
|
508
509
|
"row-data": d.value,
|
509
510
|
"column-defs": G,
|
510
511
|
loading: g.loading,
|
@@ -517,16 +518,16 @@ const gA = _("mf-payment-payoutAccount", {
|
|
517
518
|
class: "flex items-center justify-center min-h-[80vh]"
|
518
519
|
}, YA = { class: "hidden mr-6 lg:block lg:w-1/6" }, GA = ["src"], dA = { class: "w-full max-w-lg text-left" }, mA = { class: "py-4" }, CA = { class: "flex justify-end items-center mb-6" }, VA = { class: "flex space-x-4 items-center" }, jA = /* @__PURE__ */ f({
|
519
520
|
__name: "PayoutAccount",
|
520
|
-
setup(
|
521
|
-
const { currentBusiness: o, restaurants: g } = $(), { isLoading: m, startAsyncCall:
|
522
|
-
var l,
|
523
|
-
return [{ label: (l = o.value) == null ? void 0 : l.name, value: (
|
524
|
-
}), C = Z(() => B.value.length > 0 || !
|
521
|
+
setup(t) {
|
522
|
+
const { currentBusiness: o, restaurants: g } = $(), { isLoading: m, startAsyncCall: e } = L(!0), G = sA(), d = gA(), s = Z(() => d.getBusinessPayoutAccounts), B = Z(() => g.value.filter((l) => s.value.findIndex((a) => a.store.id === l._id) === -1).map((l) => ({ label: l.profile.name, value: l._id }))), b = Z(() => {
|
523
|
+
var l, a;
|
524
|
+
return [{ label: (l = o.value) == null ? void 0 : l.name, value: (a = o.value) == null ? void 0 : a._id }];
|
525
|
+
}), C = Z(() => B.value.length > 0 || !s.value.find((l) => l.store.event === "MARKETING"));
|
525
526
|
async function q(l) {
|
526
527
|
var j;
|
527
|
-
const
|
528
|
-
if (!
|
529
|
-
const A = W.initPayoutAccount(
|
528
|
+
const a = (l == null ? void 0 : l.businessId) ?? ((j = o.value) == null ? void 0 : j._id);
|
529
|
+
if (!a) throw "Business id required";
|
530
|
+
const A = W.initPayoutAccount(a, l), V = !l;
|
530
531
|
let E = !1;
|
531
532
|
l && (E = l.status === "NEW");
|
532
533
|
const M = {
|
@@ -539,7 +540,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
539
540
|
restaurantOptions: V ? B.value : g.value.map((D) => ({ label: D.profile.name, value: D._id })),
|
540
541
|
businessOptions: b.value
|
541
542
|
};
|
542
|
-
V && (B.value.length === 0 && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "ORDERING")),
|
543
|
+
V && (B.value.length === 0 && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "ORDERING")), s.value.find((D) => D.store.event === "MARKETING") && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "MARKETING")));
|
543
544
|
const v = G.open({
|
544
545
|
title: V ? "Apply Payout Account" : "View Payout Account",
|
545
546
|
closeButton: !0,
|
@@ -547,7 +548,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
547
548
|
contentComponent: BA,
|
548
549
|
contentComponentProps: M
|
549
550
|
}), H = async function(D) {
|
550
|
-
G.close(),
|
551
|
+
G.close(), e(async () => {
|
551
552
|
const P = await W.mergeData({
|
552
553
|
businessId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.MARKETING ? D.payoutSetting.store.id : void 0,
|
553
554
|
restaurantId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.ORDERING ? D.payoutSetting.store.id : void 0
|
@@ -562,11 +563,11 @@ const gA = _("mf-payment-payoutAccount", {
|
|
562
563
|
v.onPrimary(H);
|
563
564
|
}
|
564
565
|
async function F() {
|
565
|
-
await
|
566
|
+
await e(async () => {
|
566
567
|
await d.readBusinessPayoutAccounts();
|
567
568
|
});
|
568
569
|
}
|
569
|
-
return R(F), N(o, F), (l,
|
570
|
+
return R(F), N(o, F), (l, a) => {
|
570
571
|
const A = Y("FmButton");
|
571
572
|
return n(), u(tA, {
|
572
573
|
title: "Payout Accounts",
|
@@ -574,7 +575,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
574
575
|
loading: w(m)
|
575
576
|
}, {
|
576
577
|
default: Q(() => [
|
577
|
-
|
578
|
+
s.value.length ? (n(), U(T, { key: 1 }, [
|
578
579
|
r("div", CA, [
|
579
580
|
r("div", VA, [
|
580
581
|
C.value ? (n(), u(A, {
|
@@ -582,13 +583,13 @@ const gA = _("mf-payment-payoutAccount", {
|
|
582
583
|
"prepend-icon": "manage_accounts",
|
583
584
|
variant: "primary",
|
584
585
|
label: "Apply",
|
585
|
-
onClick:
|
586
|
+
onClick: a[1] || (a[1] = () => q())
|
586
587
|
})) : O("", !0)
|
587
588
|
])
|
588
589
|
]),
|
589
590
|
i(uA, {
|
590
591
|
loading: w(m),
|
591
|
-
data:
|
592
|
+
data: s.value,
|
592
593
|
onRowClick: q
|
593
594
|
}, null, 8, ["loading", "data"])
|
594
595
|
], 64)) : (n(), U("div", iA, [
|
@@ -600,14 +601,14 @@ const gA = _("mf-payment-payoutAccount", {
|
|
600
601
|
}, null, 8, GA)
|
601
602
|
]),
|
602
603
|
r("div", dA, [
|
603
|
-
|
604
|
-
|
604
|
+
a[2] || (a[2] = r("h1", { class: "text-2xl font-bold mb-2" }, " Welcome! It looks like you haven't set up a payout account yet. ", -1)),
|
605
|
+
a[3] || (a[3] = r("p", { class: "mb-2 mt-1" }, " Let's get you started—apply now and enjoy seamless payouts! ", -1)),
|
605
606
|
r("div", mA, [
|
606
607
|
i(A, {
|
607
608
|
"prepend-icon": "manage_accounts",
|
608
609
|
variant: "primary",
|
609
610
|
label: "Apply Now",
|
610
|
-
onClick:
|
611
|
+
onClick: a[0] || (a[0] = () => q())
|
611
612
|
})
|
612
613
|
])
|
613
614
|
])
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as g, resolveComponent as i, openBlock as h, createBlock as y, normalizeClass as N, withCtx as _, createElementVNode as P, toDisplayString as C, createVNode as p, computed as x, ref as E, watch as F, unref as s, isRef as b, h as v } from "vue";
|
2
|
-
import { u as S } from "./index
|
3
|
-
import { _ as O } from "./index-
|
2
|
+
import { u as S } from "./index-C6keHWJr.js";
|
3
|
+
import { _ as O } from "./index-BcCZ_0v0.js";
|
4
4
|
import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
5
|
-
import { P as V } from "./payout-account-
|
6
|
-
import { p as $ } from "./index-
|
5
|
+
import { P as V } from "./payout-account-CGdTzV98.js";
|
6
|
+
import { p as $ } from "./index-CUiFh1mv.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-
|
8
|
+
import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-ooSmpomb.js";
|
9
9
|
import { useRouter as T } from "vue-router";
|
10
10
|
import { _ as U } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
11
11
|
const G = /* @__PURE__ */ g({
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as N, mergeModels as $, ref as M, computed as w, useModel as z, watch as B, onMounted as I, resolveComponent as d, openBlock as l, createElementBlock as m, Fragment as i, unref as P, createBlock as c, createCommentVNode as y, withCtx as p, createVNode as V, renderList as _ } from "vue";
|
2
|
-
import { p as q } from "./index-
|
3
|
-
import { u as E } from "./index-
|
2
|
+
import { p as q } from "./index-CUiFh1mv.js";
|
3
|
+
import { u as E } from "./index-BcCZ_0v0.js";
|
4
4
|
import { useCoreStore as j } from "@feedmepos/mf-common";
|
5
5
|
const O = /* @__PURE__ */ N({
|
6
6
|
__name: "PayoutAccountSelector",
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as I, resolveComponent as i, openBlock as F, createElementBlock as R, Fragment as N, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as q, computed as B, unref as r, isRef as M, h as E, onMounted as O, resolveDynamicComponent as j, normalizeProps as Y, mergeProps as z } from "vue";
|
2
|
-
import { p as $ } from "./index-
|
3
|
-
import { u as H, e as D } from "./index-
|
2
|
+
import { p as $ } from "./index-CUiFh1mv.js";
|
3
|
+
import { u as H, e as D } from "./index-BcCZ_0v0.js";
|
4
4
|
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
5
|
import { useRouter as W } from "vue-router";
|
6
|
-
import { u as L } from "./index
|
6
|
+
import { u as L } from "./index-C6keHWJr.js";
|
7
7
|
import { P as K } from "./PDFViewer-xrBtzrlR.js";
|
8
8
|
import { useSnackbar as Z } from "@feedmepos/ui-library";
|
9
9
|
import { u as J } from "./error-K1CakhA9.js";
|
10
|
-
import { p as _ } from "./index-
|
10
|
+
import { p as _ } from "./index-DGdWaUJP.js";
|
11
11
|
import { z as A, a as S } from "./validator-D5jtpt9A.js";
|
12
12
|
import { useCoreStore as X } from "@feedmepos/mf-common";
|
13
13
|
const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as F, ref as y, resolveComponent as g, openBlock as x, createBlock as A, withCtx as $, createVNode as f, createElementVNode as d, normalizeStyle as T, createElementBlock as R, Fragment as D, renderList as q, computed as C, watch as I, onMounted as N, unref as b, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
|
2
|
-
import { u as O } from "./index
|
2
|
+
import { u as O } from "./index-C6keHWJr.js";
|
3
3
|
import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
4
4
|
import "@feedmepos/ui-library";
|
5
|
-
import { u as G } from "./index-
|
5
|
+
import { u as G } from "./index-BcCZ_0v0.js";
|
6
6
|
import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
7
|
-
import { r as H } from "./index-
|
7
|
+
import { r as H } from "./index-CTyGGtdE.js";
|
8
8
|
import { useRouter as J } from "vue-router";
|
9
|
-
import { g as X } from "./grafana-
|
9
|
+
import { g as X } from "./grafana-931Nxkhi.js";
|
10
10
|
const Y = ["id"], L = /* @__PURE__ */ F({
|
11
11
|
__name: "FmTableSelection",
|
12
12
|
props: {
|