@feedmepos/mf-financing 0.0.40-dev → 0.0.41-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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as v, defineComponent as mA, computed as p, resolveComponent as q, openBlock as z, createElementBlock as y, createVNode as T, withCtx as oA, createElementVNode as t, unref as m, Fragment as xA, renderList as iB, createBlock as _, toDisplayString as L, watch as uA, normalizeClass as mB, createCommentVNode as kA, useModel as eQ, normalizeStyle as ng, onMounted as ag, nextTick as fQ } from "vue";
|
|
2
2
|
import { u as KB, G as MQ, z as iQ, a as zB, b as wQ, c as PQ, _ as nQ, d as aQ } from "./validator-XyQB9Mod.js";
|
|
3
3
|
import { useCoreStore as uB, useI18n as wB } from "@feedmepos/mf-common";
|
|
4
4
|
import { useRouter as YQ } from "vue-router";
|
|
5
5
|
import "@feedmepos/ui-library";
|
|
6
6
|
const Yg = (A = !1) => {
|
|
7
|
-
const B =
|
|
7
|
+
const B = v(A);
|
|
8
8
|
function g() {
|
|
9
9
|
B.value = !0;
|
|
10
10
|
}
|
|
@@ -41,10 +41,10 @@ const Yg = (A = !1) => {
|
|
|
41
41
|
}, sQ = { class: "inline-flex" }, hQ = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer" }, GQ = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, HQ = { class: "relative" }, tQ = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, rQ = /* @__PURE__ */ mA({
|
|
42
42
|
__name: "RestaurantSelector",
|
|
43
43
|
setup(A) {
|
|
44
|
-
const B =
|
|
44
|
+
const B = v(""), g = uB(), { t: Q } = wB(), E = p(() => {
|
|
45
45
|
const I = g.currentRestaurant.value;
|
|
46
46
|
return (I == null ? void 0 : I.profile.name) + " (" + ((I == null ? void 0 : I.profile.code) ?? "--") + ")";
|
|
47
|
-
}), C =
|
|
47
|
+
}), C = p(() => g.restaurants.value.filter((I) => I.managable).filter((I) => {
|
|
48
48
|
if (!B.value)
|
|
49
49
|
return !0;
|
|
50
50
|
const D = new RegExp(B.value, "i"), e = JSON.stringify(I.profile);
|
|
@@ -55,17 +55,17 @@ const Yg = (A = !1) => {
|
|
|
55
55
|
value: I
|
|
56
56
|
})));
|
|
57
57
|
return (I, D) => {
|
|
58
|
-
const e = q("FmIcon"), M = q("FmSearch"), w = q("FmMenuItem"),
|
|
59
|
-
return z(),
|
|
60
|
-
|
|
58
|
+
const e = q("FmIcon"), M = q("FmSearch"), w = q("FmMenuItem"), n = q("FmMenu");
|
|
59
|
+
return z(), y("div", sQ, [
|
|
60
|
+
T(n, { "close-on-click": !0 }, {
|
|
61
61
|
"menu-button": oA(() => [
|
|
62
62
|
t("div", hQ, [
|
|
63
|
-
|
|
63
|
+
T(e, {
|
|
64
64
|
name: "store",
|
|
65
65
|
size: "sm"
|
|
66
66
|
}),
|
|
67
67
|
t("div", GQ, L(E.value), 1),
|
|
68
|
-
|
|
68
|
+
T(e, {
|
|
69
69
|
name: "expand_more",
|
|
70
70
|
size: "sm"
|
|
71
71
|
})
|
|
@@ -74,18 +74,18 @@ const Yg = (A = !1) => {
|
|
|
74
74
|
default: oA(() => [
|
|
75
75
|
t("div", HQ, [
|
|
76
76
|
t("div", tQ, [
|
|
77
|
-
|
|
77
|
+
T(M, {
|
|
78
78
|
"model-value": B.value,
|
|
79
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
80
|
-
placeholder:
|
|
79
|
+
"onUpdate:modelValue": D[0] || (D[0] = (Y) => B.value = Y),
|
|
80
|
+
placeholder: m(Q)("financing.components.select")
|
|
81
81
|
}, null, 8, ["model-value", "placeholder"])
|
|
82
82
|
]),
|
|
83
83
|
t("div", null, [
|
|
84
|
-
(z(!0),
|
|
85
|
-
key:
|
|
86
|
-
label:
|
|
84
|
+
(z(!0), y(xA, null, iB(C.value, (Y) => (z(), _(w, {
|
|
85
|
+
key: Y.key,
|
|
86
|
+
label: Y.label,
|
|
87
87
|
sublabel: "Restaurant",
|
|
88
|
-
onClick: () =>
|
|
88
|
+
onClick: () => m(g).changeRestaurant(Y.value)
|
|
89
89
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
90
90
|
])
|
|
91
91
|
])
|
|
@@ -110,14 +110,14 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
110
110
|
financing: {}
|
|
111
111
|
},
|
|
112
112
|
setup(A) {
|
|
113
|
-
const B = A, { t: g } = wB(), Q = YQ(), { currentRestaurant: E, sessionUser: C } = uB(), { api: I } = KB(), D =
|
|
114
|
-
var
|
|
113
|
+
const B = A, { t: g } = wB(), Q = YQ(), { currentRestaurant: E, sessionUser: C } = uB(), { api: I } = KB(), D = v(!1), e = v(null), M = v(null), w = p(() => {
|
|
114
|
+
var a, j, BA, K;
|
|
115
115
|
if (!e.value) return !1;
|
|
116
|
-
const O = (j = (
|
|
116
|
+
const O = (j = (a = e.value.gateway) == null ? void 0 : a.grab) == null ? void 0 : j.active, G = (K = (BA = e.value.gateway) == null ? void 0 : BA.softspace) == null ? void 0 : K.active;
|
|
117
117
|
return !!(e.value.payoutAccount && O && G);
|
|
118
|
-
}),
|
|
119
|
-
var O, G,
|
|
120
|
-
return e.value ? e.value.payoutAccount ? (G = (O = e.value.gateway) == null ? void 0 : O.grab) != null && G.active ? (j = (
|
|
118
|
+
}), n = p(() => {
|
|
119
|
+
var O, G, a, j;
|
|
120
|
+
return e.value ? e.value.payoutAccount ? (G = (O = e.value.gateway) == null ? void 0 : O.grab) != null && G.active ? (j = (a = e.value.gateway) == null ? void 0 : a.softspace) != null && j.active ? null : {
|
|
121
121
|
message: g("financing.stepper.eligibility.errors.gatewaySoftspace")
|
|
122
122
|
} : {
|
|
123
123
|
message: g("financing.stepper.eligibility.errors.gatewayGrab")
|
|
@@ -129,11 +129,11 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
} : null;
|
|
132
|
-
}),
|
|
133
|
-
var G,
|
|
134
|
-
if (
|
|
132
|
+
}), Y = p(() => !!B.status), l = async () => {
|
|
133
|
+
var G, a;
|
|
134
|
+
if (Y.value) return;
|
|
135
135
|
const O = (G = E.value) == null ? void 0 : G._id;
|
|
136
|
-
if (!(!((
|
|
136
|
+
if (!(!((a = C.value) != null && a.token) || !O)) {
|
|
137
137
|
D.value = !0, M.value = null, e.value = null;
|
|
138
138
|
try {
|
|
139
139
|
const j = await I(
|
|
@@ -150,12 +150,12 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
150
150
|
uA(
|
|
151
151
|
[C, E],
|
|
152
152
|
() => {
|
|
153
|
-
|
|
153
|
+
l();
|
|
154
154
|
},
|
|
155
155
|
{ immediate: !0 }
|
|
156
156
|
);
|
|
157
|
-
const
|
|
158
|
-
if (!
|
|
157
|
+
const N = p(() => {
|
|
158
|
+
if (!Y.value)
|
|
159
159
|
return D.value || !w.value ? 1 : 2;
|
|
160
160
|
switch (B.status) {
|
|
161
161
|
case IA.Draft:
|
|
@@ -168,36 +168,36 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
168
168
|
default:
|
|
169
169
|
return 3;
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
171
|
+
}), k = (O) => N.value > O, S = (O) => N.value === O, b = () => {
|
|
172
172
|
Q.push({ name: "mf-financing-application-submission" });
|
|
173
|
-
}, iA =
|
|
174
|
-
var
|
|
175
|
-
const O = () => D.value ? { type: "loading", name: "" } :
|
|
173
|
+
}, iA = p(() => {
|
|
174
|
+
var a, j, BA, K, wA, AB;
|
|
175
|
+
const O = () => D.value ? { type: "loading", name: "" } : S(1) ? w.value ? {
|
|
176
176
|
type: "icon",
|
|
177
177
|
name: "pending_actions",
|
|
178
178
|
class: "text-gray-300"
|
|
179
179
|
} : { type: "icon", name: "error", class: "text-red-500" } : {
|
|
180
180
|
type: "icon",
|
|
181
181
|
name: "check_circle",
|
|
182
|
-
class:
|
|
183
|
-
}, G = () => D.value || w.value ? null : M.value ? { message: M.value } :
|
|
182
|
+
class: k(1) ? "text-green-500" : "text-gray-300"
|
|
183
|
+
}, G = () => D.value || w.value ? null : M.value ? { message: M.value } : n.value;
|
|
184
184
|
return [
|
|
185
185
|
{
|
|
186
186
|
key: "eligibility",
|
|
187
187
|
value: 1,
|
|
188
188
|
icon: O(),
|
|
189
189
|
error: G(),
|
|
190
|
-
hint: w.value && ((BA = (j = (
|
|
190
|
+
hint: w.value && ((BA = (j = (a = e.value) == null ? void 0 : a.gateway) == null ? void 0 : j.grab) != null && BA.id) ? g("financing.stepper.eligibility.hints.grabId", {
|
|
191
191
|
grabId: (AB = (wA = (K = e.value) == null ? void 0 : K.gateway) == null ? void 0 : wA.grab) == null ? void 0 : AB.id
|
|
192
192
|
}) : void 0
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
key: "apply",
|
|
196
196
|
value: 2,
|
|
197
|
-
icon:
|
|
197
|
+
icon: S(2) ? { type: "icon", name: "pending_actions", class: "text-orange-500" } : {
|
|
198
198
|
type: "icon",
|
|
199
199
|
name: "check_circle",
|
|
200
|
-
class:
|
|
200
|
+
class: k(2) ? "text-green-500" : "text-gray-300"
|
|
201
201
|
},
|
|
202
202
|
action: b,
|
|
203
203
|
actionLabel: "financing.stepper.steps.apply.button"
|
|
@@ -205,43 +205,43 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
205
205
|
{
|
|
206
206
|
key: "processing",
|
|
207
207
|
value: 3,
|
|
208
|
-
icon:
|
|
208
|
+
icon: S(3) ? {
|
|
209
209
|
type: "icon",
|
|
210
210
|
name: "hourglass_bottom",
|
|
211
211
|
class: "text-orange-500"
|
|
212
212
|
} : {
|
|
213
213
|
type: "icon",
|
|
214
214
|
name: "check_circle",
|
|
215
|
-
class:
|
|
215
|
+
class: k(3) ? "text-green-500" : "text-gray-300"
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
key: "disbursed",
|
|
220
220
|
value: 4,
|
|
221
|
-
icon:
|
|
221
|
+
icon: S(4) ? { type: "icon", name: "hourglass_bottom", class: "text-orange-300" } : {
|
|
222
222
|
type: "icon",
|
|
223
223
|
name: "check_circle",
|
|
224
|
-
class:
|
|
224
|
+
class: k(4) ? "text-green-500" : "text-gray-300"
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
];
|
|
228
228
|
});
|
|
229
229
|
return (O, G) => {
|
|
230
|
-
const
|
|
230
|
+
const a = q("FmCardHeader"), j = q("FmCircularProgress"), BA = q("FmIcon"), K = q("FmButton"), wA = q("FmCardSection"), AB = q("FmCard");
|
|
231
231
|
return z(), _(AB, { variant: "outlined" }, {
|
|
232
232
|
default: oA(() => [
|
|
233
|
-
|
|
234
|
-
title:
|
|
235
|
-
subtitle:
|
|
233
|
+
T(a, {
|
|
234
|
+
title: m(g)("financing.stepper.title"),
|
|
235
|
+
subtitle: m(g)("financing.stepper.description")
|
|
236
236
|
}, null, 8, ["title", "subtitle"]),
|
|
237
|
-
|
|
237
|
+
T(wA, { class: "pt-0" }, {
|
|
238
238
|
default: oA(() => [
|
|
239
239
|
t("div", zQ, [
|
|
240
240
|
t("div", RQ, [
|
|
241
|
-
(z(!0),
|
|
241
|
+
(z(!0), y(xA, null, iB(iA.value, (u) => (z(), y("div", {
|
|
242
242
|
key: u.key,
|
|
243
243
|
class: mB(["flex items-start", [
|
|
244
|
-
|
|
244
|
+
S(u.value) ? "bg-orange-50 rounded-lg p-3 -my-2" : "mx-3"
|
|
245
245
|
]])
|
|
246
246
|
}, [
|
|
247
247
|
t("div", dQ, [
|
|
@@ -255,11 +255,11 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
255
255
|
}, null, 8, ["name", "class"]))
|
|
256
256
|
]),
|
|
257
257
|
t("div", FQ, [
|
|
258
|
-
t("p", xQ, L(
|
|
259
|
-
t("p", mQ, L(
|
|
260
|
-
u.error ? (z(),
|
|
261
|
-
u.error.message ? (z(),
|
|
262
|
-
|
|
258
|
+
t("p", xQ, L(m(g)(`financing.stepper.steps.${u.key}.title`)), 1),
|
|
259
|
+
t("p", mQ, L(m(g)(`financing.stepper.steps.${u.key}.description`)), 1),
|
|
260
|
+
u.error ? (z(), y("div", TQ, [
|
|
261
|
+
u.error.message ? (z(), y(xA, { key: 0 }, [
|
|
262
|
+
T(BA, {
|
|
263
263
|
name: "cancel",
|
|
264
264
|
class: "text-red-500 text-base flex-shrink-0"
|
|
265
265
|
}),
|
|
@@ -274,14 +274,14 @@ const UQ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAdACAMAAAC954ZHAA
|
|
|
274
274
|
onClick: u.error.action.handler
|
|
275
275
|
}, null, 8, ["label", "onClick"])) : kA("", !0)
|
|
276
276
|
])) : kA("", !0),
|
|
277
|
-
u.hint ? (z(),
|
|
277
|
+
u.hint ? (z(), y("div", kQ, [
|
|
278
278
|
t("span", OQ, L(u.hint), 1)
|
|
279
279
|
])) : kA("", !0),
|
|
280
|
-
u.action &&
|
|
280
|
+
u.action && S(u.value) ? (z(), _(K, {
|
|
281
281
|
key: 2,
|
|
282
282
|
variant: "primary",
|
|
283
283
|
class: "mt-3",
|
|
284
|
-
label:
|
|
284
|
+
label: m(g)(u.actionLabel),
|
|
285
285
|
onClick: u.action
|
|
286
286
|
}, null, 8, ["label", "onClick"])) : kA("", !0)
|
|
287
287
|
])
|
|
@@ -721,7 +721,7 @@ function CE(A, B, g) {
|
|
|
721
721
|
function GB(A) {
|
|
722
722
|
return A % 4 === 0 && A % 100 !== 0 || A % 400 === 0;
|
|
723
723
|
}
|
|
724
|
-
var
|
|
724
|
+
var Z = 0, aA = 1, DA = 2, J = 3, gA = 4, YA = 5, dA = 6, IE = 7, DE = 8;
|
|
725
725
|
P("Y", 0, 0, function() {
|
|
726
726
|
var A = this.year();
|
|
727
727
|
return A <= 9999 ? eA(A, 4) : "+" + A;
|
|
@@ -737,15 +737,15 @@ i("YY", F, X);
|
|
|
737
737
|
i("YYYY", LB, SB);
|
|
738
738
|
i("YYYYY", YB, nB);
|
|
739
739
|
i("YYYYYY", YB, nB);
|
|
740
|
-
R(["YYYYY", "YYYYYY"],
|
|
740
|
+
R(["YYYYY", "YYYYYY"], Z);
|
|
741
741
|
R("YYYY", function(A, B) {
|
|
742
|
-
B[
|
|
742
|
+
B[Z] = A.length === 2 ? f.parseTwoDigitYear(A) : h(A);
|
|
743
743
|
});
|
|
744
744
|
R("YY", function(A, B) {
|
|
745
|
-
B[
|
|
745
|
+
B[Z] = f.parseTwoDigitYear(A);
|
|
746
746
|
});
|
|
747
747
|
R("Y", function(A, B) {
|
|
748
|
-
B[
|
|
748
|
+
B[Z] = parseInt(A, 10);
|
|
749
749
|
});
|
|
750
750
|
function ZA(A) {
|
|
751
751
|
return GB(A) ? 366 : 365;
|
|
@@ -1124,8 +1124,8 @@ function SE(A) {
|
|
|
1124
1124
|
return this._weekdaysParseExact ? (r(this, "_weekdaysRegex") || WB.call(this), A ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (r(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = cE), this._weekdaysMinStrictRegex && A ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
|
|
1125
1125
|
}
|
|
1126
1126
|
function WB() {
|
|
1127
|
-
function A(w,
|
|
1128
|
-
return
|
|
1127
|
+
function A(w, n) {
|
|
1128
|
+
return n.length - w.length;
|
|
1129
1129
|
}
|
|
1130
1130
|
var B = [], g = [], Q = [], E = [], C, I, D, e, M;
|
|
1131
1131
|
for (C = 0; C < 7; C++)
|
|
@@ -1236,7 +1236,7 @@ var Kg = {
|
|
|
1236
1236
|
weekdaysMin: lE,
|
|
1237
1237
|
weekdaysShort: cg,
|
|
1238
1238
|
meridiemParse: XE
|
|
1239
|
-
},
|
|
1239
|
+
}, x = {}, yA = {}, XA;
|
|
1240
1240
|
function _E(A, B) {
|
|
1241
1241
|
var g, Q = Math.min(A.length, B.length);
|
|
1242
1242
|
for (g = 0; g < Q; g += 1)
|
|
@@ -1265,13 +1265,13 @@ function AC(A) {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
function HB(A) {
|
|
1267
1267
|
var B = null, g;
|
|
1268
|
-
if (
|
|
1268
|
+
if (x[A] === void 0 && typeof module < "u" && module && module.exports && AC(A))
|
|
1269
1269
|
try {
|
|
1270
1270
|
B = XA._abbr, g = require, g("./locale/" + A), zA(B);
|
|
1271
1271
|
} catch {
|
|
1272
|
-
|
|
1272
|
+
x[A] = null;
|
|
1273
1273
|
}
|
|
1274
|
-
return
|
|
1274
|
+
return x[A];
|
|
1275
1275
|
}
|
|
1276
1276
|
function zA(A, B) {
|
|
1277
1277
|
var g;
|
|
@@ -1282,14 +1282,14 @@ function zA(A, B) {
|
|
|
1282
1282
|
function $B(A, B) {
|
|
1283
1283
|
if (B !== null) {
|
|
1284
1284
|
var g, Q = Kg;
|
|
1285
|
-
if (B.abbr = A,
|
|
1285
|
+
if (B.abbr = A, x[A] != null)
|
|
1286
1286
|
Hg(
|
|
1287
1287
|
"defineLocaleOverride",
|
|
1288
1288
|
"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
|
|
1289
|
-
), Q =
|
|
1289
|
+
), Q = x[A]._config;
|
|
1290
1290
|
else if (B.parentLocale != null)
|
|
1291
|
-
if (
|
|
1292
|
-
Q =
|
|
1291
|
+
if (x[B.parentLocale] != null)
|
|
1292
|
+
Q = x[B.parentLocale]._config;
|
|
1293
1293
|
else if (g = HB(B.parentLocale), g != null)
|
|
1294
1294
|
Q = g._config;
|
|
1295
1295
|
else
|
|
@@ -1297,19 +1297,19 @@ function $B(A, B) {
|
|
|
1297
1297
|
name: A,
|
|
1298
1298
|
config: B
|
|
1299
1299
|
}), null;
|
|
1300
|
-
return
|
|
1300
|
+
return x[A] = new yB(lB(Q, B)), yA[A] && yA[A].forEach(function(E) {
|
|
1301
1301
|
$B(E.name, E.config);
|
|
1302
|
-
}), zA(A),
|
|
1302
|
+
}), zA(A), x[A];
|
|
1303
1303
|
} else
|
|
1304
|
-
return delete
|
|
1304
|
+
return delete x[A], null;
|
|
1305
1305
|
}
|
|
1306
1306
|
function BC(A, B) {
|
|
1307
1307
|
if (B != null) {
|
|
1308
1308
|
var g, Q, E = Kg;
|
|
1309
|
-
|
|
1309
|
+
x[A] != null && x[A].parentLocale != null ? x[A].set(lB(x[A]._config, B)) : (Q = HB(A), Q != null && (E = Q._config), B = lB(E, B), Q == null && (B.abbr = A), g = new yB(B), g.parentLocale = x[A], x[A] = g), zA(A);
|
|
1310
1310
|
} else
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1311
|
+
x[A] != null && (x[A].parentLocale != null ? (x[A] = x[A].parentLocale, A === zA() && zA(A)) : x[A] != null && delete x[A]);
|
|
1312
|
+
return x[A];
|
|
1313
1313
|
}
|
|
1314
1314
|
function HA(A) {
|
|
1315
1315
|
var B;
|
|
@@ -1323,11 +1323,11 @@ function HA(A) {
|
|
|
1323
1323
|
return $E(A);
|
|
1324
1324
|
}
|
|
1325
1325
|
function gC() {
|
|
1326
|
-
return kB(
|
|
1326
|
+
return kB(x);
|
|
1327
1327
|
}
|
|
1328
1328
|
function Ag(A) {
|
|
1329
1329
|
var B, g = A._a;
|
|
1330
|
-
return g && s(A).overflow === -2 && (B = g[aA] < 0 || g[aA] > 11 ? aA : g[DA] < 1 || g[DA] > XB(g[
|
|
1330
|
+
return g && s(A).overflow === -2 && (B = g[aA] < 0 || g[aA] > 11 ? aA : g[DA] < 1 || g[DA] > XB(g[Z], g[aA]) ? DA : g[J] < 0 || g[J] > 24 || g[J] === 24 && (g[gA] !== 0 || g[YA] !== 0 || g[dA] !== 0) ? J : g[gA] < 0 || g[gA] > 59 ? gA : g[YA] < 0 || g[YA] > 59 ? YA : g[dA] < 0 || g[dA] > 999 ? dA : -1, s(A)._overflowDayOfYear && (B < Z || B > DA) && (B = DA), s(A)._overflowWeeks && B === -1 && (B = IE), s(A)._overflowWeekday && B === -1 && (B = DE), s(A).overflow = B), A;
|
|
1331
1331
|
}
|
|
1332
1332
|
var QC = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, EC = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, CC = /Z|[+-]\d\d(?::?\d\d)?/, QB = [
|
|
1333
1333
|
["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
|
|
@@ -1492,7 +1492,7 @@ function nC(A) {
|
|
|
1492
1492
|
function Bg(A) {
|
|
1493
1493
|
var B, g, Q = [], E, C, I;
|
|
1494
1494
|
if (!A._d) {
|
|
1495
|
-
for (E = nC(A), A._w && A._a[DA] == null && A._a[aA] == null && aC(A), A._dayOfYear != null && (I = OA(A._a[
|
|
1495
|
+
for (E = nC(A), A._w && A._a[DA] == null && A._a[aA] == null && aC(A), A._dayOfYear != null && (I = OA(A._a[Z], E[Z]), (A._dayOfYear > ZA(I) || A._dayOfYear === 0) && (s(A)._overflowDayOfYear = !0), g = LA(I, 0, A._dayOfYear), A._a[aA] = g.getUTCMonth(), A._a[DA] = g.getUTCDate()), B = 0; B < 3 && A._a[B] == null; ++B)
|
|
1496
1496
|
A._a[B] = Q[B] = E[B];
|
|
1497
1497
|
for (; B < 7; B++)
|
|
1498
1498
|
A._a[B] = Q[B] = A._a[B] == null ? B === 2 ? 1 : 0 : A._a[B];
|
|
@@ -1506,9 +1506,9 @@ function aC(A) {
|
|
|
1506
1506
|
var B, g, Q, E, C, I, D, e, M;
|
|
1507
1507
|
B = A._w, B.GG != null || B.W != null || B.E != null ? (C = 1, I = 4, g = OA(
|
|
1508
1508
|
B.GG,
|
|
1509
|
-
A._a[
|
|
1509
|
+
A._a[Z],
|
|
1510
1510
|
VA(d(), 1, 4).year
|
|
1511
|
-
), Q = OA(B.W, 1), E = OA(B.E, 1), (E < 1 || E > 7) && (e = !0)) : (C = A._locale._week.dow, I = A._locale._week.doy, M = VA(d(), C, I), g = OA(B.gg, A._a[
|
|
1511
|
+
), Q = OA(B.W, 1), E = OA(B.E, 1), (E < 1 || E > 7) && (e = !0)) : (C = A._locale._week.dow, I = A._locale._week.doy, M = VA(d(), C, I), g = OA(B.gg, A._a[Z], M.year), Q = OA(B.w, M.week), B.d != null ? (E = B.d, (E < 0 || E > 6) && (e = !0)) : B.e != null ? (E = B.e + C, (B.e < 0 || B.e > 6) && (e = !0)) : E = C), Q < 1 || Q > hA(g, C, I) ? s(A)._overflowWeeks = !0 : e != null ? s(A)._overflowWeekday = !0 : (D = Og(g, Q, E, C, I), A._a[Z] = D.year, A._dayOfYear = D.dayOfYear);
|
|
1512
1512
|
}
|
|
1513
1513
|
f.ISO_8601 = function() {
|
|
1514
1514
|
};
|
|
@@ -1533,7 +1533,7 @@ function gg(A) {
|
|
|
1533
1533
|
A._locale,
|
|
1534
1534
|
A._a[J],
|
|
1535
1535
|
A._meridiem
|
|
1536
|
-
), M = s(A).era, M !== null && (A._a[
|
|
1536
|
+
), M = s(A).era, M !== null && (A._a[Z] = A._locale.erasConvertYear(M, A._a[Z])), Bg(A), Ag(A);
|
|
1537
1537
|
}
|
|
1538
1538
|
function YC(A, B, g) {
|
|
1539
1539
|
var Q;
|
|
@@ -2179,10 +2179,10 @@ i("yy", JA);
|
|
|
2179
2179
|
i("yyy", JA);
|
|
2180
2180
|
i("yyyy", JA);
|
|
2181
2181
|
i("yo", uI);
|
|
2182
|
-
R(["y", "yy", "yyy", "yyyy"],
|
|
2182
|
+
R(["y", "yy", "yyy", "yyyy"], Z);
|
|
2183
2183
|
R(["yo"], function(A, B, g, Q) {
|
|
2184
2184
|
var E;
|
|
2185
|
-
g._locale._eraYearOrdinalRegex && (E = A.match(g._locale._eraYearOrdinalRegex)), g._locale.eraYearOrdinalParse ? B[
|
|
2185
|
+
g._locale._eraYearOrdinalRegex && (E = A.match(g._locale._eraYearOrdinalRegex)), g._locale.eraYearOrdinalParse ? B[Z] = g._locale.eraYearOrdinalParse(A, E) : B[Z] = parseInt(A, 10);
|
|
2186
2186
|
});
|
|
2187
2187
|
function dI(A, B) {
|
|
2188
2188
|
var g, Q, E, C = this._eras || HA("en")._eras;
|
|
@@ -2757,8 +2757,8 @@ function TD(A, B, g, Q, E) {
|
|
|
2757
2757
|
return E.relativeTime(B || 1, !!g, A, Q);
|
|
2758
2758
|
}
|
|
2759
2759
|
function lD(A, B, g, Q) {
|
|
2760
|
-
var E = CA(A).abs(), C = nA(E.as("s")), I = nA(E.as("m")), D = nA(E.as("h")), e = nA(E.as("d")), M = nA(E.as("M")), w = nA(E.as("w")),
|
|
2761
|
-
return g.w != null && (
|
|
2760
|
+
var E = CA(A).abs(), C = nA(E.as("s")), I = nA(E.as("m")), D = nA(E.as("h")), e = nA(E.as("d")), M = nA(E.as("M")), w = nA(E.as("w")), n = nA(E.as("y")), Y = C <= g.ss && ["s", C] || C < g.s && ["ss", C] || I <= 1 && ["m"] || I < g.m && ["mm", I] || D <= 1 && ["h"] || D < g.h && ["hh", D] || e <= 1 && ["d"] || e < g.d && ["dd", e];
|
|
2761
|
+
return g.w != null && (Y = Y || w <= 1 && ["w"] || w < g.w && ["ww", w]), Y = Y || M <= 1 && ["M"] || M < g.M && ["MM", M] || n <= 1 && ["y"] || ["yy", n], Y[2] = B, Y[3] = +A > 0, Y[4] = Q, TD.apply(null, Y);
|
|
2762
2762
|
}
|
|
2763
2763
|
function kD(A) {
|
|
2764
2764
|
return A === void 0 ? nA : typeof A == "function" ? (nA = A, !0) : !1;
|
|
@@ -2779,8 +2779,8 @@ function lA(A) {
|
|
|
2779
2779
|
function UB() {
|
|
2780
2780
|
if (!this.isValid())
|
|
2781
2781
|
return this.localeData().invalidDate();
|
|
2782
|
-
var A = xB(this._milliseconds) / 1e3, B = xB(this._days), g = xB(this._months), Q, E, C, I, D = this.asSeconds(), e, M, w,
|
|
2783
|
-
return D ? (Q = W(A / 60), E = W(Q / 60), A %= 60, Q %= 60, C = W(g / 12), g %= 12, I = A ? A.toFixed(3).replace(/\.?0+$/, "") : "", e = D < 0 ? "-" : "", M = lA(this._months) !== lA(D) ? "-" : "", w = lA(this._days) !== lA(D) ? "-" : "",
|
|
2782
|
+
var A = xB(this._milliseconds) / 1e3, B = xB(this._days), g = xB(this._months), Q, E, C, I, D = this.asSeconds(), e, M, w, n;
|
|
2783
|
+
return D ? (Q = W(A / 60), E = W(Q / 60), A %= 60, Q %= 60, C = W(g / 12), g %= 12, I = A ? A.toFixed(3).replace(/\.?0+$/, "") : "", e = D < 0 ? "-" : "", M = lA(this._months) !== lA(D) ? "-" : "", w = lA(this._days) !== lA(D) ? "-" : "", n = lA(this._milliseconds) !== lA(D) ? "-" : "", e + "P" + (C ? M + C + "Y" : "") + (g ? M + g + "M" : "") + (B ? w + B + "D" : "") + (E || Q || A ? "T" : "") + (E ? n + E + "H" : "") + (Q ? n + Q + "M" : "") + (A ? n + I + "S" : "")) : "P0D";
|
|
2784
2784
|
}
|
|
2785
2785
|
var H = tB.prototype;
|
|
2786
2786
|
H.isValid = FC;
|
|
@@ -2888,7 +2888,7 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2888
2888
|
},
|
|
2889
2889
|
emits: ["update:modelValue"],
|
|
2890
2890
|
setup(A) {
|
|
2891
|
-
const B = eQ(A, "modelValue"), g =
|
|
2891
|
+
const B = eQ(A, "modelValue"), g = v(B.value || { startDate: "", endDate: "" }), Q = p(() => g.value ? `${g.value.startDate ?? "Start"} ~ ${g.value.endDate ?? "End"}` : "No dates selected.");
|
|
2892
2892
|
return uA(g, ({ startDate: E, endDate: C }) => {
|
|
2893
2893
|
const I = f(E, "YYYY-MM-DD"), D = f(C, "YYYY-MM-DD");
|
|
2894
2894
|
if (!I.isValid() || !D.isValid()) return !1;
|
|
@@ -2900,22 +2900,22 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2900
2900
|
modelValue: g.value,
|
|
2901
2901
|
"onUpdate:modelValue": C[0] || (C[0] = (e) => g.value = e),
|
|
2902
2902
|
"show-predefined-range": "",
|
|
2903
|
-
rules:
|
|
2904
|
-
|
|
2905
|
-
startDate:
|
|
2906
|
-
endDate:
|
|
2903
|
+
rules: m(iQ)(
|
|
2904
|
+
m(zB).object({
|
|
2905
|
+
startDate: m(zB).string(),
|
|
2906
|
+
endDate: m(zB).string()
|
|
2907
2907
|
}).refine(({ startDate: e, endDate: M }) => {
|
|
2908
|
-
const w =
|
|
2909
|
-
if (!w.isValid() || !
|
|
2910
|
-
const
|
|
2911
|
-
return
|
|
2908
|
+
const w = m(f)(e, "YYYY-MM-DD"), n = m(f)(M, "YYYY-MM-DD");
|
|
2909
|
+
if (!w.isValid() || !n.isValid()) return !1;
|
|
2910
|
+
const Y = n.diff(w, "days");
|
|
2911
|
+
return Y <= 30 && Y >= 0;
|
|
2912
2912
|
}, {
|
|
2913
2913
|
message: "Date range cannot exceed 30 days"
|
|
2914
2914
|
})
|
|
2915
2915
|
)
|
|
2916
2916
|
}, {
|
|
2917
2917
|
"trigger-button": oA(() => [
|
|
2918
|
-
|
|
2918
|
+
T(I, {
|
|
2919
2919
|
icon: "calendar_month",
|
|
2920
2920
|
label: Q.value
|
|
2921
2921
|
}, null, 8, ["label"])
|
|
@@ -2932,7 +2932,7 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2932
2932
|
},
|
|
2933
2933
|
emits: ["update:modelValue"],
|
|
2934
2934
|
setup(A, { emit: B }) {
|
|
2935
|
-
const g = B, Q = A, E =
|
|
2935
|
+
const g = B, Q = A, E = v(!1);
|
|
2936
2936
|
return (C, I) => {
|
|
2937
2937
|
const D = q("FmButton"), e = q("FmMenuItem"), M = q("FmMenu");
|
|
2938
2938
|
return z(), _(M, {
|
|
@@ -2943,9 +2943,9 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2943
2943
|
"menu-button": oA(() => {
|
|
2944
2944
|
var w;
|
|
2945
2945
|
return [
|
|
2946
|
-
|
|
2946
|
+
T(D, {
|
|
2947
2947
|
icon: E.value ? "expand_less" : "expand_more",
|
|
2948
|
-
label: (w = A.items.find((
|
|
2948
|
+
label: (w = A.items.find((n) => n.value === Q.value)) == null ? void 0 : w.label,
|
|
2949
2949
|
"icon-position": "append",
|
|
2950
2950
|
size: "md",
|
|
2951
2951
|
variant: "tertiary"
|
|
@@ -2958,12 +2958,12 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2958
2958
|
style: ng({ maxHeight: `${w}px` }),
|
|
2959
2959
|
class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
|
|
2960
2960
|
}, [
|
|
2961
|
-
(z(!0),
|
|
2962
|
-
key:
|
|
2963
|
-
label:
|
|
2964
|
-
value:
|
|
2965
|
-
"model-value":
|
|
2966
|
-
"onUpdate:modelValue": (
|
|
2961
|
+
(z(!0), y(xA, null, iB(A.items, (n) => (z(), _(e, {
|
|
2962
|
+
key: n.value,
|
|
2963
|
+
label: n.label,
|
|
2964
|
+
value: n.value,
|
|
2965
|
+
"model-value": n.value === Q.value,
|
|
2966
|
+
"onUpdate:modelValue": (Y) => g("update:modelValue", n.value)
|
|
2967
2967
|
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
2968
2968
|
], 12, jD)
|
|
2969
2969
|
]),
|
|
@@ -2997,90 +2997,90 @@ const qD = /* @__PURE__ */ mA({
|
|
|
2997
2997
|
const Q = [10, 20, 30, 50, 100].map((G) => ({
|
|
2998
2998
|
label: G.toString(),
|
|
2999
2999
|
value: G
|
|
3000
|
-
})), E = A, C = g, { isLoading: I, startLoading: D, stopLoading: e } = Yg(!0), M =
|
|
3001
|
-
D(), G && (w.value = [],
|
|
3002
|
-
const
|
|
3003
|
-
w.value = [...w.value ?? [], ...
|
|
3004
|
-
},
|
|
3005
|
-
const G =
|
|
3006
|
-
return (w.value ?? []).slice(G,
|
|
3000
|
+
})), E = A, C = g, { isLoading: I, startLoading: D, stopLoading: e } = Yg(!0), M = v(), w = v(), n = v(""), Y = v(10), l = v(1), N = v(0), k = async function(G = !1) {
|
|
3001
|
+
D(), G && (w.value = [], n.value = "", l.value = 1, await fQ(), N.value = 0);
|
|
3002
|
+
const a = await E.paginate(Y.value, n.value);
|
|
3003
|
+
w.value = [...w.value ?? [], ...a.items], n.value = a.cursor ?? "", N.value += 1, e();
|
|
3004
|
+
}, S = p(() => l.value > 1), b = p(() => l.value < N.value ? !0 : n.value > ""), iA = p(() => {
|
|
3005
|
+
const G = Y.value * (l.value - 1), a = G + Y.value;
|
|
3006
|
+
return (w.value ?? []).slice(G, a).map(E.rowsDefs);
|
|
3007
3007
|
});
|
|
3008
|
-
uA(
|
|
3009
|
-
G >
|
|
3010
|
-
}), ag(() =>
|
|
3011
|
-
const O =
|
|
3008
|
+
uA(Y, () => k(!0)), uA(l, (G) => {
|
|
3009
|
+
G > N.value && k();
|
|
3010
|
+
}), ag(() => k());
|
|
3011
|
+
const O = p(() => Y.value * (l.value - 1));
|
|
3012
3012
|
return B({
|
|
3013
|
-
reset: () =>
|
|
3013
|
+
reset: () => k(!0),
|
|
3014
3014
|
data: () => w.value ?? [],
|
|
3015
3015
|
allData: async () => {
|
|
3016
|
-
let G = [],
|
|
3016
|
+
let G = [], a = "";
|
|
3017
3017
|
do {
|
|
3018
|
-
const j = await E.paginate(100,
|
|
3019
|
-
G = [...G, ...j.items],
|
|
3020
|
-
} while (
|
|
3018
|
+
const j = await E.paginate(100, a);
|
|
3019
|
+
G = [...G, ...j.items], a = j.cursor ?? "";
|
|
3020
|
+
} while (a > "");
|
|
3021
3021
|
return G;
|
|
3022
3022
|
},
|
|
3023
3023
|
pageData: () => {
|
|
3024
|
-
const G =
|
|
3025
|
-
return (w.value ?? []).slice(G,
|
|
3024
|
+
const G = Y.value * (l.value - 1), a = G + Y.value;
|
|
3025
|
+
return (w.value ?? []).slice(G, a);
|
|
3026
3026
|
},
|
|
3027
|
-
replaceData: (G,
|
|
3028
|
-
const j =
|
|
3029
|
-
w.value && (w.value[j] =
|
|
3027
|
+
replaceData: (G, a) => {
|
|
3028
|
+
const j = Y.value * (l.value - 1) + G;
|
|
3029
|
+
w.value && (w.value[j] = a);
|
|
3030
3030
|
}
|
|
3031
|
-
}), (G,
|
|
3031
|
+
}), (G, a) => {
|
|
3032
3032
|
const j = q("FmTable"), BA = q("FmButton");
|
|
3033
|
-
return z(),
|
|
3034
|
-
|
|
3033
|
+
return z(), y(xA, null, [
|
|
3034
|
+
T(j, {
|
|
3035
3035
|
modelValue: M.value,
|
|
3036
|
-
"onUpdate:modelValue":
|
|
3037
|
-
loading:
|
|
3038
|
-
"page-size":
|
|
3036
|
+
"onUpdate:modelValue": a[0] || (a[0] = (K) => M.value = K),
|
|
3037
|
+
loading: m(I),
|
|
3038
|
+
"page-size": Y.value,
|
|
3039
3039
|
"row-data": iA.value,
|
|
3040
3040
|
"column-defs": A.columnDefs,
|
|
3041
3041
|
"hide-footer": !0,
|
|
3042
3042
|
"shrink-at": !1,
|
|
3043
|
-
onRowClick:
|
|
3043
|
+
onRowClick: a[1] || (a[1] = (K) => {
|
|
3044
3044
|
var wA;
|
|
3045
3045
|
return C("row-click", (wA = w.value) == null ? void 0 : wA.at(O.value + K.index));
|
|
3046
3046
|
})
|
|
3047
3047
|
}, null, 8, ["modelValue", "loading", "page-size", "row-data", "column-defs"]),
|
|
3048
|
-
|
|
3048
|
+
m(I) ? kA("", !0) : (z(), y("div", KD, [
|
|
3049
3049
|
t("div", uD, [
|
|
3050
3050
|
t("div", JD, [
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
items:
|
|
3054
|
-
value:
|
|
3055
|
-
"onUpdate:modelValue":
|
|
3051
|
+
a[6] || (a[6] = t("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
3052
|
+
T(Pg, {
|
|
3053
|
+
items: m(Q),
|
|
3054
|
+
value: Y.value,
|
|
3055
|
+
"onUpdate:modelValue": a[2] || (a[2] = (K) => Y.value = K)
|
|
3056
3056
|
}, null, 8, ["items", "value"])
|
|
3057
3057
|
]),
|
|
3058
|
-
t("span", ND, L((
|
|
3058
|
+
t("span", ND, L((l.value - 1) * Y.value) + " - " + L((l.value - 1) * Y.value + Y.value), 1)
|
|
3059
3059
|
]),
|
|
3060
3060
|
t("div", vD, [
|
|
3061
|
-
|
|
3062
|
-
items: Array.from(Array(
|
|
3061
|
+
T(Pg, {
|
|
3062
|
+
items: Array.from(Array(N.value), (K, wA) => wA + 1).map((K) => ({
|
|
3063
3063
|
label: K.toString(),
|
|
3064
3064
|
value: K
|
|
3065
3065
|
})),
|
|
3066
|
-
value:
|
|
3067
|
-
"onUpdate:modelValue":
|
|
3066
|
+
value: l.value,
|
|
3067
|
+
"onUpdate:modelValue": a[3] || (a[3] = (K) => l.value = K)
|
|
3068
3068
|
}, null, 8, ["items", "value"]),
|
|
3069
|
-
t("span", yD, " Page " + L(
|
|
3069
|
+
t("span", yD, " Page " + L(l.value), 1),
|
|
3070
3070
|
t("div", pD, [
|
|
3071
|
-
|
|
3072
|
-
disabled: !
|
|
3071
|
+
T(BA, {
|
|
3072
|
+
disabled: !S.value,
|
|
3073
3073
|
icon: "chevron_left",
|
|
3074
3074
|
"icon-color": "neutral-black",
|
|
3075
3075
|
variant: "tertiary",
|
|
3076
|
-
onClick:
|
|
3076
|
+
onClick: a[4] || (a[4] = () => l.value -= 1)
|
|
3077
3077
|
}, null, 8, ["disabled"]),
|
|
3078
|
-
|
|
3078
|
+
T(BA, {
|
|
3079
3079
|
disabled: !b.value,
|
|
3080
3080
|
icon: "chevron_right",
|
|
3081
3081
|
"icon-color": "neutral-black",
|
|
3082
3082
|
variant: "tertiary",
|
|
3083
|
-
onClick:
|
|
3083
|
+
onClick: a[5] || (a[5] = () => l.value += 1)
|
|
3084
3084
|
}, null, 8, ["disabled"])
|
|
3085
3085
|
])
|
|
3086
3086
|
])
|
|
@@ -3094,7 +3094,7 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3094
3094
|
financing: {}
|
|
3095
3095
|
},
|
|
3096
3096
|
setup(A) {
|
|
3097
|
-
const B = A, { t: g } = wB(), { api: Q } = KB(), E =
|
|
3097
|
+
const B = A, { t: g } = wB(), { api: Q } = KB(), E = v(), C = v({
|
|
3098
3098
|
startDate: f().subtract(1, "month").format("YYYY-MM-DD"),
|
|
3099
3099
|
endDate: f().format("YYYY-MM-DD")
|
|
3100
3100
|
});
|
|
@@ -3106,7 +3106,7 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3106
3106
|
},
|
|
3107
3107
|
{ deep: !0 }
|
|
3108
3108
|
);
|
|
3109
|
-
const I =
|
|
3109
|
+
const I = p(() => [
|
|
3110
3110
|
{
|
|
3111
3111
|
label: g("financing.dashboard.principalLoan"),
|
|
3112
3112
|
value: BB(B.financing.principalAmount)
|
|
@@ -3146,8 +3146,8 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3146
3146
|
header: () => g("financing.dashboard.table.type"),
|
|
3147
3147
|
accessorKey: "type",
|
|
3148
3148
|
cell: ({ cell: w }) => {
|
|
3149
|
-
const
|
|
3150
|
-
switch (
|
|
3149
|
+
const n = w.getValue();
|
|
3150
|
+
switch (n) {
|
|
3151
3151
|
case "deposit":
|
|
3152
3152
|
return g("financing.dashboard.transactionType.deposit");
|
|
3153
3153
|
case "repayment_balance":
|
|
@@ -3161,7 +3161,7 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3161
3161
|
case "arrears_repayment_sales":
|
|
3162
3162
|
return g("financing.dashboard.transactionType.arrearsRepaymentSales");
|
|
3163
3163
|
}
|
|
3164
|
-
return
|
|
3164
|
+
return n;
|
|
3165
3165
|
}
|
|
3166
3166
|
},
|
|
3167
3167
|
{
|
|
@@ -3169,37 +3169,37 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3169
3169
|
accessorKey: "amount",
|
|
3170
3170
|
cell: ({ cell: w }) => BB(w.getValue())
|
|
3171
3171
|
}
|
|
3172
|
-
], M = async (w,
|
|
3172
|
+
], M = async (w, n) => {
|
|
3173
3173
|
if (!B.financing)
|
|
3174
3174
|
return { items: [], cursor: "" };
|
|
3175
|
-
const
|
|
3175
|
+
const Y = n === "[]" || !n ? "" : n;
|
|
3176
3176
|
return Q(
|
|
3177
3177
|
wQ({
|
|
3178
3178
|
financingId: B.financing.id,
|
|
3179
3179
|
limit: w,
|
|
3180
|
-
cursor:
|
|
3180
|
+
cursor: Y,
|
|
3181
3181
|
startDate: f(C.value.startDate).startOf("day").utc().toISOString(),
|
|
3182
3182
|
endDate: f(C.value.endDate).endOf("day").utc().toISOString()
|
|
3183
3183
|
})
|
|
3184
3184
|
);
|
|
3185
3185
|
};
|
|
3186
|
-
return (w,
|
|
3187
|
-
const
|
|
3188
|
-
return z(),
|
|
3189
|
-
l
|
|
3186
|
+
return (w, n) => {
|
|
3187
|
+
const Y = q("FmCardSection"), l = q("FmCard");
|
|
3188
|
+
return z(), y("div", SD, [
|
|
3189
|
+
T(l, null, {
|
|
3190
3190
|
default: oA(() => [
|
|
3191
|
-
|
|
3191
|
+
T(Y, { class: "p-2" }, {
|
|
3192
3192
|
default: oA(() => [
|
|
3193
3193
|
t("div", LD, [
|
|
3194
|
-
(z(!0),
|
|
3195
|
-
key:
|
|
3194
|
+
(z(!0), y(xA, null, iB(I.value, (N, k) => (z(), y("div", {
|
|
3195
|
+
key: k,
|
|
3196
3196
|
class: "flex-1 px-8 py-4"
|
|
3197
3197
|
}, [
|
|
3198
|
-
t("p", VD, L(
|
|
3198
|
+
t("p", VD, L(N.label), 1),
|
|
3199
3199
|
t("b", {
|
|
3200
3200
|
class: "fm-typo-en-title-md-500",
|
|
3201
|
-
style: ng({ color:
|
|
3202
|
-
}, L(
|
|
3201
|
+
style: ng({ color: N.isError ? "#E53E3E" : void 0 })
|
|
3202
|
+
}, L(N.value), 5)
|
|
3203
3203
|
]))), 128))
|
|
3204
3204
|
])
|
|
3205
3205
|
]),
|
|
@@ -3209,14 +3209,14 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3209
3209
|
_: 1
|
|
3210
3210
|
}),
|
|
3211
3211
|
t("div", XD, [
|
|
3212
|
-
t("h4", bD, L(
|
|
3212
|
+
t("h4", bD, L(m(g)("financing.dashboard.payments")), 1)
|
|
3213
3213
|
]),
|
|
3214
|
-
|
|
3214
|
+
T(qD, {
|
|
3215
3215
|
modelValue: C.value,
|
|
3216
|
-
"onUpdate:modelValue":
|
|
3216
|
+
"onUpdate:modelValue": n[0] || (n[0] = (N) => C.value = N)
|
|
3217
3217
|
}, null, 8, ["modelValue"]),
|
|
3218
3218
|
t("div", WD, [
|
|
3219
|
-
|
|
3219
|
+
T(ZD, {
|
|
3220
3220
|
ref_key: "controller",
|
|
3221
3221
|
ref: E,
|
|
3222
3222
|
"column-defs": e,
|
|
@@ -3239,52 +3239,53 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3239
3239
|
}, Mo = /* @__PURE__ */ mA({
|
|
3240
3240
|
__name: "Application",
|
|
3241
3241
|
setup(A) {
|
|
3242
|
-
const { t: B } = wB(), { currentRestaurant: g, sessionUser: Q, restaurants: E } = uB(), { api: C } = KB(), { hasFinancingAccess: I } = PQ(), { isLoading: D, startAsyncCall: e } = Yg(!1), M =
|
|
3243
|
-
var
|
|
3244
|
-
return (
|
|
3245
|
-
}),
|
|
3246
|
-
var
|
|
3247
|
-
return
|
|
3248
|
-
}),
|
|
3249
|
-
var
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
)
|
|
3259
|
-
|
|
3260
|
-
|
|
3242
|
+
const { t: B } = wB(), { currentRestaurant: g, sessionUser: Q, restaurants: E } = uB(), { api: C } = KB(), { hasFinancingAccess: I } = PQ(), { isLoading: D, startAsyncCall: e } = Yg(!1), M = v(null), w = p(() => (E.value ?? []).length > 0), n = v(!0), Y = p(() => {
|
|
3243
|
+
var k;
|
|
3244
|
+
return !!((k = Q.value) != null && k.token) && !w.value;
|
|
3245
|
+
}), l = p(() => {
|
|
3246
|
+
var k, S, b, iA;
|
|
3247
|
+
return ((k = M == null ? void 0 : M.value) == null ? void 0 : k.status) == IA.Active || ((S = M == null ? void 0 : M.value) == null ? void 0 : S.status) == IA.EarlySettlement || ((b = M == null ? void 0 : M.value) == null ? void 0 : b.status) == IA.Defaulted || ((iA = M == null ? void 0 : M.value) == null ? void 0 : iA.status) == IA.Closed;
|
|
3248
|
+
}), N = () => {
|
|
3249
|
+
var k, S;
|
|
3250
|
+
try {
|
|
3251
|
+
if (n.value = !0, !I.value) return;
|
|
3252
|
+
const b = (k = g.value) == null ? void 0 : k._id;
|
|
3253
|
+
(S = Q.value) != null && S.token && b && e(async () => {
|
|
3254
|
+
const O = (await C(
|
|
3255
|
+
aQ(b)
|
|
3256
|
+
)).sort((G, a) => new Date(a.createdAt).getTime() - new Date(G.createdAt).getTime());
|
|
3257
|
+
M.value = O[0] ?? null;
|
|
3258
|
+
});
|
|
3259
|
+
} finally {
|
|
3260
|
+
n.value = !1;
|
|
3261
|
+
}
|
|
3261
3262
|
};
|
|
3262
3263
|
return ag(() => {
|
|
3263
|
-
|
|
3264
|
+
N();
|
|
3264
3265
|
}), uA([Q, g], () => {
|
|
3265
|
-
|
|
3266
|
-
}), (
|
|
3266
|
+
N();
|
|
3267
|
+
}), (k, S) => {
|
|
3267
3268
|
const b = q("FmIcon"), iA = q("FmCircularProgress");
|
|
3268
3269
|
return z(), _(nQ, {
|
|
3269
|
-
title:
|
|
3270
|
-
loading:
|
|
3270
|
+
title: m(B)("financing.title"),
|
|
3271
|
+
loading: n.value
|
|
3271
3272
|
}, {
|
|
3272
3273
|
default: oA(() => {
|
|
3273
3274
|
var O;
|
|
3274
3275
|
return [
|
|
3275
|
-
|
|
3276
|
-
|
|
3276
|
+
m(I) ? Y.value ? (z(), y("div", go, [
|
|
3277
|
+
T(b, {
|
|
3277
3278
|
name: "store",
|
|
3278
3279
|
size: "lg",
|
|
3279
3280
|
class: "text-fm-color-typo-tertiary"
|
|
3280
3281
|
}),
|
|
3281
|
-
t("h3", Qo, L(
|
|
3282
|
-
t("p", Eo, L(
|
|
3283
|
-
])) : (z(),
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
])) : M.value &&
|
|
3282
|
+
t("h3", Qo, L(m(B)("financing.empty.title")), 1),
|
|
3283
|
+
t("p", Eo, L(m(B)("financing.empty.description")), 1)
|
|
3284
|
+
])) : (z(), y(xA, { key: 2 }, [
|
|
3285
|
+
T(rQ, { class: "mb-6" }),
|
|
3286
|
+
m(D) ? (z(), y("div", Co, [
|
|
3287
|
+
T(iA, { size: "xl" })
|
|
3288
|
+
])) : M.value && l.value ? (z(), _(_D, {
|
|
3288
3289
|
key: 1,
|
|
3289
3290
|
financing: M.value
|
|
3290
3291
|
}, null, 8, ["financing"])) : (z(), _(cQ, {
|
|
@@ -3292,14 +3293,14 @@ const qD = /* @__PURE__ */ mA({
|
|
|
3292
3293
|
status: (O = M.value) == null ? void 0 : O.status,
|
|
3293
3294
|
financing: M.value
|
|
3294
3295
|
}, null, 8, ["status", "financing"]))
|
|
3295
|
-
], 64)) : (z(),
|
|
3296
|
-
|
|
3296
|
+
], 64)) : (z(), y("div", $D, [
|
|
3297
|
+
T(b, {
|
|
3297
3298
|
name: "lock",
|
|
3298
3299
|
size: "lg",
|
|
3299
3300
|
class: "text-fm-color-typo-tertiary"
|
|
3300
3301
|
}),
|
|
3301
|
-
t("h3", Ao, L(
|
|
3302
|
-
t("p", Bo, L(
|
|
3302
|
+
t("h3", Ao, L(m(B)("financing.forbidden.title")), 1),
|
|
3303
|
+
t("p", Bo, L(m(B)("financing.forbidden.description")), 1)
|
|
3303
3304
|
]))
|
|
3304
3305
|
];
|
|
3305
3306
|
}),
|