@feedmepos/mf-payment 1.0.15-beta.1 → 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-l4A6Ajr0.js → PayoutAccount-6es5M8rA.js} +121 -121
- package/dist/{PayoutAccount-dtsTUmnX.js → PayoutAccount-BLnAnrdL.js} +5 -5
- package/dist/{PayoutAccountSelector.vue_vue_type_script_setup_true_lang-BjT0jPPT.js → PayoutAccountSelector.vue_vue_type_script_setup_true_lang-Cfkyp9mf.js} +2 -2
- package/dist/{PayoutAccountSetting-MNe72Xch.js → PayoutAccountSetting-BmqsY0rS.js} +4 -4
- package/dist/{Restaurant-CWTarexR.js → Restaurant-BYlL_o6q.js} +4 -4
- package/dist/{RestaurantSetting-C3UwJRhV.js → RestaurantSetting-Cj1hxkIg.js} +4 -4
- package/dist/{Settlement-BJWzgef0.js → Settlement-B5kB8Fnq.js} +3 -3
- package/dist/{Settlement-C5-hK393.js → Settlement-Nq0i8Jkq.js} +3 -3
- package/dist/{SettlementTransactions-1bzrb-en.js → SettlementTransactions-C7L0siVw.js} +4 -4
- package/dist/{SettlementTransactions-B0C3TLeJ.js → SettlementTransactions-D4utbC0A.js} +4 -4
- package/dist/{Terminal-CL615F0f.js → Terminal-CDQJ9wy0.js} +5 -5
- package/dist/{TerminalSetting-N7MqKUrx.js → TerminalSetting-BgFe3rKb.js} +3 -3
- package/dist/{TerminalTransaction-C-uJvC9s.js → TerminalTransaction-BSjwDhBv.js} +276 -276
- package/dist/{TerminalTransaction-C1_-OLp7.js → TerminalTransaction-CnQmbEoQ.js} +6 -6
- package/dist/{Transaction-BOY1I5RC.js → Transaction-CAzMLsJt.js} +5 -5
- package/dist/{Transaction-8uNAJ4T8.js → Transaction-CV2ymNDx.js} +6 -6
- package/dist/{TransactionOld-Gic-pPOx.js → TransactionOld-CgLoRexV.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BG0k8Are.js → TransactionTable.vue_vue_type_script_setup_true_lang-CktM2jzP.js} +2 -2
- package/dist/{app-CfLF-w5m.js → app-Ci-Vcr4m.js} +119 -119
- package/dist/app.js +1 -1
- package/dist/{assets-zEtGtHpM.js → assets-FkjGSBQ1.js} +1 -1
- package/dist/{grafana-Caf7XeE2.js → grafana-931Nxkhi.js} +1 -1
- package/dist/{index-DZUHnLwT.js → index-BcCZ_0v0.js} +1 -1
- package/dist/{index-Dq9nYjxz.js → index-BgRAawwk.js} +1 -1
- package/dist/{index-VCLCd5p_.js → index-C6keHWJr.js} +1 -1
- package/dist/{index-CeU9kAEV.js → index-CBBlXAaP.js} +1 -1
- package/dist/{index-CZNw14CO.js → index-CTyGGtdE.js} +1 -1
- package/dist/{index-aFmpBzeO.js → index-CUiFh1mv.js} +1 -1
- package/dist/{index-BMkyd9LW.js → index-CoZV8mxc.js} +1 -1
- package/dist/{index-DXfQGr_b.js → index-DGdWaUJP.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CGPy2dcS.js → index.vue_vue_type_script_setup_true_lang-ooSmpomb.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-_qPb9wQT.js → payout-account-CGdTzV98.js} +2 -2
- package/dist/{transaction-DA_67zyG.js → transaction-2NjSBj5U.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -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,30 +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
161
|
type: "number",
|
162
162
|
rules: w(X)(w(x).string().min(1))
|
163
163
|
}, null, 8, ["modelValue", "rules"]),
|
164
164
|
i(E, {
|
165
|
-
modelValue:
|
166
|
-
"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),
|
167
167
|
label: "Holder name",
|
168
168
|
"label-mark": "required",
|
169
169
|
rules: w(X)(w(x).string().min(1))
|
@@ -174,23 +174,23 @@ const gA = _("mf-payment-payoutAccount", {
|
|
174
174
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
175
175
|
], -1)),
|
176
176
|
i(E, {
|
177
|
-
modelValue:
|
178
|
-
"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),
|
179
179
|
label: "Name",
|
180
180
|
"label-mark": "required",
|
181
181
|
rules: w(X)(w(x).string().min(1))
|
182
182
|
}, null, 8, ["modelValue", "rules"]),
|
183
183
|
i(M, {
|
184
|
-
modelValue:
|
185
|
-
"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),
|
186
186
|
"default-country": "MY",
|
187
187
|
label: "Phone No",
|
188
188
|
"label-mark": "required",
|
189
189
|
rules: w(X)(w(x).string().min(7))
|
190
190
|
}, null, 8, ["modelValue", "rules"]),
|
191
191
|
i(E, {
|
192
|
-
modelValue:
|
193
|
-
"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),
|
194
194
|
label: "Email",
|
195
195
|
inputmode: "email",
|
196
196
|
"label-mark": "required",
|
@@ -201,18 +201,18 @@ const gA = _("mf-payment-payoutAccount", {
|
|
201
201
|
r("span", { class: "text-left mx-6 text-gray-500" }, "Legal Documents"),
|
202
202
|
r("hr", { class: "flex-grow border-t border-gray-300" })
|
203
203
|
], -1)),
|
204
|
-
|
204
|
+
t.isNewAccount && B.value === "" ? (n(), u(v, {
|
205
205
|
key: 0,
|
206
206
|
class: "h-[300px] w-full",
|
207
207
|
label: "Exterior Photo",
|
208
208
|
"label-mark": "required",
|
209
209
|
accept: ".png,.jpg,.jpeg,.webp",
|
210
|
-
disabled: !
|
210
|
+
disabled: !t.isNewAccount,
|
211
211
|
onFileUpload: b
|
212
212
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
213
213
|
key: 1,
|
214
|
-
modelValue:
|
215
|
-
"onUpdate:modelValue": A[9] || (A[9] = (c) =>
|
214
|
+
modelValue: s.value,
|
215
|
+
"onUpdate:modelValue": A[9] || (A[9] = (c) => s.value = c),
|
216
216
|
label: "Exterior Photo"
|
217
217
|
}, {
|
218
218
|
default: Q(() => [
|
@@ -220,7 +220,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
220
220
|
class: "h-[300px] w-full",
|
221
221
|
src: B.value
|
222
222
|
}, null, 8, rA),
|
223
|
-
|
223
|
+
t.isNewAccount ? (n(), u(H, {
|
224
224
|
key: 0,
|
225
225
|
variant: "tertiary",
|
226
226
|
label: "Remove",
|
@@ -231,28 +231,28 @@ const gA = _("mf-payment-payoutAccount", {
|
|
231
231
|
]),
|
232
232
|
_: 1
|
233
233
|
}, 8, ["modelValue"])),
|
234
|
-
|
234
|
+
t.isNewAccount && s.value === "" ? (n(), u(v, {
|
235
235
|
key: 2,
|
236
236
|
class: "h-[300px] w-full",
|
237
237
|
label: "Bank Statement w/ Holder Name",
|
238
238
|
"label-mark": "required",
|
239
239
|
accept: ".pdf",
|
240
|
-
disabled: !
|
240
|
+
disabled: !t.isNewAccount,
|
241
241
|
onFileUpload: q
|
242
242
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
243
243
|
key: 3,
|
244
|
-
modelValue:
|
245
|
-
"onUpdate:modelValue": A[11] || (A[11] = (c) =>
|
244
|
+
modelValue: s.value,
|
245
|
+
"onUpdate:modelValue": A[11] || (A[11] = (c) => s.value = c),
|
246
246
|
label: "Bank Statement w/ Holder Name"
|
247
247
|
}, {
|
248
248
|
default: Q(() => [
|
249
249
|
i(K, {
|
250
250
|
height: 300,
|
251
|
-
pdf:
|
251
|
+
pdf: s.value,
|
252
252
|
"disable-text-layer": !0,
|
253
253
|
"disable-annotation-layer": !0
|
254
254
|
}, null, 8, ["pdf"]),
|
255
|
-
|
255
|
+
t.isNewAccount ? (n(), u(H, {
|
256
256
|
key: 0,
|
257
257
|
variant: "tertiary",
|
258
258
|
label: "Remove",
|
@@ -263,13 +263,13 @@ const gA = _("mf-payment-payoutAccount", {
|
|
263
263
|
]),
|
264
264
|
_: 1
|
265
265
|
}, 8, ["modelValue"])),
|
266
|
-
|
266
|
+
t.isNewAccount && d.value === "" ? (n(), u(v, {
|
267
267
|
key: 4,
|
268
268
|
class: "w-full h-[300px]",
|
269
269
|
label: "SSM Certificate ( Form D )",
|
270
270
|
"label-mark": "required",
|
271
271
|
accept: ".pdf",
|
272
|
-
disabled: !
|
272
|
+
disabled: !t.isNewAccount,
|
273
273
|
onFileUpload: F
|
274
274
|
}, null, 8, ["disabled"])) : (n(), u(j, {
|
275
275
|
key: 5,
|
@@ -284,7 +284,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
284
284
|
"disable-text-layer": !0,
|
285
285
|
"disable-annotation-layer": !0
|
286
286
|
}, null, 8, ["pdf"]),
|
287
|
-
|
287
|
+
t.isNewAccount ? (n(), u(H, {
|
288
288
|
key: 0,
|
289
289
|
variant: "tertiary",
|
290
290
|
label: "Remove",
|
@@ -295,7 +295,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
295
295
|
]),
|
296
296
|
_: 1
|
297
297
|
}, 8, ["modelValue"])),
|
298
|
-
|
298
|
+
t.isNewAccount ? (n(), U("div", oA, [
|
299
299
|
i(H, {
|
300
300
|
type: "submit",
|
301
301
|
disabled: !G.value,
|
@@ -316,12 +316,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
316
316
|
row: {},
|
317
317
|
data: {}
|
318
318
|
},
|
319
|
-
setup(
|
320
|
-
const o =
|
319
|
+
setup(t) {
|
320
|
+
const o = t;
|
321
321
|
function g() {
|
322
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";
|
323
323
|
}
|
324
|
-
return (m,
|
324
|
+
return (m, e) => {
|
325
325
|
const G = Y("FmBadge");
|
326
326
|
return n(), u(G, {
|
327
327
|
inline: "",
|
@@ -340,15 +340,15 @@ const gA = _("mf-payment-payoutAccount", {
|
|
340
340
|
row: {},
|
341
341
|
data: {}
|
342
342
|
},
|
343
|
-
setup(
|
344
|
-
const o =
|
343
|
+
setup(t) {
|
344
|
+
const o = t;
|
345
345
|
function g() {
|
346
346
|
return o.data ? "#66BB6A" : "#EF5350";
|
347
347
|
}
|
348
348
|
function m() {
|
349
349
|
return o.data ? "check" : "close";
|
350
350
|
}
|
351
|
-
return (
|
351
|
+
return (e, G) => {
|
352
352
|
const d = Y("FmIcon");
|
353
353
|
return n(), u(d, {
|
354
354
|
name: m(),
|
@@ -363,12 +363,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
363
363
|
row: {},
|
364
364
|
data: {}
|
365
365
|
},
|
366
|
-
setup(
|
366
|
+
setup(t) {
|
367
367
|
function o(g) {
|
368
368
|
return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
369
369
|
}
|
370
370
|
return (g, m) => {
|
371
|
-
const
|
371
|
+
const e = Y("FmBadge"), G = Y("FmListItem");
|
372
372
|
return n(), u(G, {
|
373
373
|
label: g.row.original.holderName,
|
374
374
|
sublabel: g.row.original.bankName + " - " + g.row.original.bankNumber,
|
@@ -376,7 +376,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
376
376
|
tag: "label"
|
377
377
|
}, {
|
378
378
|
append: Q(() => [
|
379
|
-
i(
|
379
|
+
i(e, {
|
380
380
|
inline: "",
|
381
381
|
class: h(o(g.row.original.bankReady))
|
382
382
|
}, null, 8, ["class"])
|
@@ -391,12 +391,12 @@ const gA = _("mf-payment-payoutAccount", {
|
|
391
391
|
row: {},
|
392
392
|
data: {}
|
393
393
|
},
|
394
|
-
setup(
|
394
|
+
setup(t) {
|
395
395
|
function o(g) {
|
396
396
|
return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
397
397
|
}
|
398
398
|
return (g, m) => {
|
399
|
-
const
|
399
|
+
const e = Y("FmBadge"), G = Y("FmListItem");
|
400
400
|
return n(), u(G, {
|
401
401
|
label: g.row.original.picName,
|
402
402
|
sublabel: g.row.original.picEmail + " - " + g.row.original.picPhone,
|
@@ -404,7 +404,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
404
404
|
tag: "label"
|
405
405
|
}, {
|
406
406
|
append: Q(() => [
|
407
|
-
i(
|
407
|
+
i(e, {
|
408
408
|
inline: "",
|
409
409
|
class: h(o(g.row.original.picReady))
|
410
410
|
}, null, 8, ["class"])
|
@@ -426,8 +426,8 @@ const gA = _("mf-payment-payoutAccount", {
|
|
426
426
|
}
|
427
427
|
},
|
428
428
|
emits: ["row-click"],
|
429
|
-
setup(
|
430
|
-
const g =
|
429
|
+
setup(t, { emit: o }) {
|
430
|
+
const g = t, m = o, e = I(""), G = [
|
431
431
|
{
|
432
432
|
header: () => "Type",
|
433
433
|
accessorKey: "event",
|
@@ -442,7 +442,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
442
442
|
{
|
443
443
|
header: () => "Status",
|
444
444
|
accessorKey: "status",
|
445
|
-
cell: ({ cell:
|
445
|
+
cell: ({ cell: s, row: B }) => y(lA, { row: B, data: s.getValue() }),
|
446
446
|
meta: {
|
447
447
|
maxWidth: "108px"
|
448
448
|
}
|
@@ -453,30 +453,30 @@ const gA = _("mf-payment-payoutAccount", {
|
|
453
453
|
meta: {
|
454
454
|
maxWidth: "64px"
|
455
455
|
},
|
456
|
-
cell: ({ cell:
|
456
|
+
cell: ({ cell: s, row: B }) => y(cA, { row: B, data: s.getValue() })
|
457
457
|
},
|
458
458
|
{
|
459
459
|
header: () => "Bank Details",
|
460
460
|
accessorKey: "bank",
|
461
|
-
cell: ({ cell:
|
461
|
+
cell: ({ cell: s, row: B }) => y(nA, { row: B, data: s.getValue() })
|
462
462
|
},
|
463
463
|
{
|
464
464
|
header: () => "Person In-Charge (PIC)",
|
465
465
|
accessorKey: "pic",
|
466
|
-
cell: ({ cell:
|
466
|
+
cell: ({ cell: s, row: B }) => y(wA, { row: B, data: s.getValue() })
|
467
467
|
}
|
468
|
-
], d = Z(() => g.data.map((
|
468
|
+
], d = Z(() => g.data.map((s) => {
|
469
469
|
const B = {
|
470
470
|
bankReady: !1,
|
471
471
|
bankNumber: "",
|
472
472
|
bankName: "",
|
473
473
|
holderName: ""
|
474
474
|
};
|
475
|
-
|
475
|
+
s.store.bank && s.store.bank.accountNumber && Object.assign(B, {
|
476
476
|
bankReady: !0,
|
477
|
-
bankNumber:
|
478
|
-
bankName:
|
479
|
-
holderName:
|
477
|
+
bankNumber: s.store.bank.accountNumber,
|
478
|
+
bankName: s.store.bank.name,
|
479
|
+
holderName: s.store.bank.holderName
|
480
480
|
});
|
481
481
|
const b = {
|
482
482
|
picReady: !1,
|
@@ -484,28 +484,28 @@ const gA = _("mf-payment-payoutAccount", {
|
|
484
484
|
picPhone: "",
|
485
485
|
picEmail: ""
|
486
486
|
};
|
487
|
-
|
487
|
+
s.store.keyPerson && Object.assign(b, {
|
488
488
|
picReady: !0,
|
489
|
-
picName:
|
490
|
-
picPhone:
|
491
|
-
picEmail:
|
489
|
+
picName: s.store.keyPerson.name,
|
490
|
+
picPhone: s.store.keyPerson.phone,
|
491
|
+
picEmail: s.store.keyPerson.email
|
492
492
|
});
|
493
|
-
let C =
|
494
|
-
return
|
495
|
-
_id:
|
496
|
-
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,
|
497
497
|
name: C,
|
498
|
-
status:
|
499
|
-
isActive:
|
498
|
+
status: s.status,
|
499
|
+
isActive: s.enable,
|
500
500
|
...B,
|
501
501
|
...b
|
502
502
|
};
|
503
503
|
}));
|
504
|
-
return (
|
504
|
+
return (s, B) => {
|
505
505
|
const b = Y("FmTable");
|
506
506
|
return n(), u(b, {
|
507
|
-
modelValue:
|
508
|
-
"onUpdate:modelValue": B[0] || (B[0] = (C) =>
|
507
|
+
modelValue: e.value,
|
508
|
+
"onUpdate:modelValue": B[0] || (B[0] = (C) => e.value = C),
|
509
509
|
"row-data": d.value,
|
510
510
|
"column-defs": G,
|
511
511
|
loading: g.loading,
|
@@ -518,16 +518,16 @@ const gA = _("mf-payment-payoutAccount", {
|
|
518
518
|
class: "flex items-center justify-center min-h-[80vh]"
|
519
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({
|
520
520
|
__name: "PayoutAccount",
|
521
|
-
setup(
|
522
|
-
const { currentBusiness: o, restaurants: g } = $(), { isLoading: m, startAsyncCall:
|
523
|
-
var l,
|
524
|
-
return [{ label: (l = o.value) == null ? void 0 : l.name, value: (
|
525
|
-
}), 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"));
|
526
526
|
async function q(l) {
|
527
527
|
var j;
|
528
|
-
const
|
529
|
-
if (!
|
530
|
-
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;
|
531
531
|
let E = !1;
|
532
532
|
l && (E = l.status === "NEW");
|
533
533
|
const M = {
|
@@ -540,7 +540,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
540
540
|
restaurantOptions: V ? B.value : g.value.map((D) => ({ label: D.profile.name, value: D._id })),
|
541
541
|
businessOptions: b.value
|
542
542
|
};
|
543
|
-
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")));
|
544
544
|
const v = G.open({
|
545
545
|
title: V ? "Apply Payout Account" : "View Payout Account",
|
546
546
|
closeButton: !0,
|
@@ -548,7 +548,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
548
548
|
contentComponent: BA,
|
549
549
|
contentComponentProps: M
|
550
550
|
}), H = async function(D) {
|
551
|
-
G.close(),
|
551
|
+
G.close(), e(async () => {
|
552
552
|
const P = await W.mergeData({
|
553
553
|
businessId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.MARKETING ? D.payoutSetting.store.id : void 0,
|
554
554
|
restaurantId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.ORDERING ? D.payoutSetting.store.id : void 0
|
@@ -563,11 +563,11 @@ const gA = _("mf-payment-payoutAccount", {
|
|
563
563
|
v.onPrimary(H);
|
564
564
|
}
|
565
565
|
async function F() {
|
566
|
-
await
|
566
|
+
await e(async () => {
|
567
567
|
await d.readBusinessPayoutAccounts();
|
568
568
|
});
|
569
569
|
}
|
570
|
-
return R(F), N(o, F), (l,
|
570
|
+
return R(F), N(o, F), (l, a) => {
|
571
571
|
const A = Y("FmButton");
|
572
572
|
return n(), u(tA, {
|
573
573
|
title: "Payout Accounts",
|
@@ -575,7 +575,7 @@ const gA = _("mf-payment-payoutAccount", {
|
|
575
575
|
loading: w(m)
|
576
576
|
}, {
|
577
577
|
default: Q(() => [
|
578
|
-
|
578
|
+
s.value.length ? (n(), U(T, { key: 1 }, [
|
579
579
|
r("div", CA, [
|
580
580
|
r("div", VA, [
|
581
581
|
C.value ? (n(), u(A, {
|
@@ -583,13 +583,13 @@ const gA = _("mf-payment-payoutAccount", {
|
|
583
583
|
"prepend-icon": "manage_accounts",
|
584
584
|
variant: "primary",
|
585
585
|
label: "Apply",
|
586
|
-
onClick:
|
586
|
+
onClick: a[1] || (a[1] = () => q())
|
587
587
|
})) : O("", !0)
|
588
588
|
])
|
589
589
|
]),
|
590
590
|
i(uA, {
|
591
591
|
loading: w(m),
|
592
|
-
data:
|
592
|
+
data: s.value,
|
593
593
|
onRowClick: q
|
594
594
|
}, null, 8, ["loading", "data"])
|
595
595
|
], 64)) : (n(), U("div", iA, [
|
@@ -601,14 +601,14 @@ const gA = _("mf-payment-payoutAccount", {
|
|
601
601
|
}, null, 8, GA)
|
602
602
|
]),
|
603
603
|
r("div", dA, [
|
604
|
-
|
605
|
-
|
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)),
|
606
606
|
r("div", mA, [
|
607
607
|
i(A, {
|
608
608
|
"prepend-icon": "manage_accounts",
|
609
609
|
variant: "primary",
|
610
610
|
label: "Apply Now",
|
611
|
-
onClick:
|
611
|
+
onClick: a[0] || (a[0] = () => q())
|
612
612
|
})
|
613
613
|
])
|
614
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: {
|