@gisce/react-ooui 2.10.6 → 2.10.7
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/react-ooui.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var gi = Object.defineProperty;
|
|
|
2
2
|
var yi = (e, t, n) => t in e ? gi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var wr = (e, t, n) => (yi(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsxs as D, jsx as i, Fragment as ie } from "react/jsx-runtime";
|
|
5
|
-
import rt, { useContext as te, useState as b, useEffect as fe, useRef as re, createContext as wi, forwardRef as pt, useImperativeHandle as ht, useCallback as
|
|
5
|
+
import rt, { useContext as te, useState as b, useEffect as fe, useRef as re, createContext as wi, forwardRef as pt, useImperativeHandle as ht, useCallback as J, Fragment as Gr, useMemo as Ie, memo as Wn } from "react";
|
|
6
6
|
import { Tooltip as wt, theme as Ke, Typography as Pt, Form as ct, Row as Ve, Col as ye, Modal as Ze, Button as Ne, Dropdown as vi, Menu as vr, Spin as je, Divider as fn, Space as Ge, Input as it, Select as Ot, Checkbox as Gt, Alert as Je, Timeline as Dn, Statistic as bi, Card as Un, Tag as Yr, message as On, DatePicker as Gn, TimePicker as Ci, InputNumber as qr, Progress as xi, Avatar as zr, Pagination as Si, Badge as Ti, Tabs as Jr, Radio as br, Switch as Ii, Steps as Cr, Layout as Fi } from "antd";
|
|
7
7
|
import { Label as Nt, Field as En, Tree as Xr, Reference as Oi, Selection as Yn, Many2one as Qr, Boolean as Ri, Container as Vi, parseContext as St, Form as Zr, Integer as kn, SearchFieldTypes as yt, SearchFilter as _i, parseContextFields as Ai, parseDomainFields as Di, transformDomainForChildWidget as qn, graphProcessor as eo, parseGraph as zn, graphFieldUtils as Ei } from "@gisce/ooui";
|
|
8
8
|
import * as xr from "@ant-design/icons";
|
|
@@ -1688,7 +1688,7 @@ const Rt = ({
|
|
|
1688
1688
|
setSearchTreeNameSearch: V,
|
|
1689
1689
|
goToResourceId: I,
|
|
1690
1690
|
limit: S
|
|
1691
|
-
} = e, [_, x] = b(!1), [R, A] = b(!1), [N, K] = b(!1), [j, W] = b(!0), [M,
|
|
1691
|
+
} = e, [_, x] = b(!1), [R, A] = b(!1), [N, K] = b(!1), [j, W] = b(!0), [M, Y] = b(!0), [z, Q] = b([]), [U, H] = b(!1), [E, L] = b([]), [$, de] = b(!1), [Z, oe] = b(!0), [ve, X] = b(), [ae, xe] = b({}), [De, Ee] = b(
|
|
1692
1692
|
S !== void 0 ? S : Ft
|
|
1693
1693
|
), [ke, ue] = b(o);
|
|
1694
1694
|
fe(() => {
|
|
@@ -1696,13 +1696,13 @@ const Rt = ({
|
|
|
1696
1696
|
}, [p]), fe(() => {
|
|
1697
1697
|
Ee(S !== void 0 ? S : Ft);
|
|
1698
1698
|
}, [S]), fe(() => {
|
|
1699
|
-
s.length === 1 ?
|
|
1699
|
+
s.length === 1 ? X(s[0]) : s.length > 1 && X(
|
|
1700
1700
|
s.filter(
|
|
1701
1701
|
(Le) => Le.view_id !== n.view_id
|
|
1702
1702
|
)[0]
|
|
1703
1703
|
);
|
|
1704
1704
|
}, [s]), fe(() => {
|
|
1705
|
-
(ve == null ? void 0 : ve.view_id) === n.view_id && s.length > 1 &&
|
|
1705
|
+
(ve == null ? void 0 : ve.view_id) === n.view_id && s.length > 1 && X(
|
|
1706
1706
|
s.filter(
|
|
1707
1707
|
(Le) => Le.view_id !== n.view_id
|
|
1708
1708
|
)[0]
|
|
@@ -1740,13 +1740,13 @@ const Rt = ({
|
|
|
1740
1740
|
formIsLoading: j,
|
|
1741
1741
|
setFormIsLoading: W,
|
|
1742
1742
|
treeIsLoading: M,
|
|
1743
|
-
setTreeIsLoading:
|
|
1743
|
+
setTreeIsLoading: Y,
|
|
1744
1744
|
attachments: z,
|
|
1745
|
-
setAttachments:
|
|
1745
|
+
setAttachments: Q,
|
|
1746
1746
|
selectedRowItems: C,
|
|
1747
1747
|
setSelectedRowItems: F,
|
|
1748
|
-
duplicatingItem:
|
|
1749
|
-
setDuplicatingItem:
|
|
1748
|
+
duplicatingItem: U,
|
|
1749
|
+
setDuplicatingItem: H,
|
|
1750
1750
|
setSearchParams: L,
|
|
1751
1751
|
searchParams: E,
|
|
1752
1752
|
searchVisible: $,
|
|
@@ -1760,7 +1760,7 @@ const Rt = ({
|
|
|
1760
1760
|
setGraphIsLoading: oe,
|
|
1761
1761
|
graphIsLoading: Z,
|
|
1762
1762
|
previousView: ve,
|
|
1763
|
-
setPreviousView:
|
|
1763
|
+
setPreviousView: X,
|
|
1764
1764
|
goToResourceId: I,
|
|
1765
1765
|
searchValues: ae,
|
|
1766
1766
|
setSearchValues: xe,
|
|
@@ -1831,7 +1831,7 @@ const Rt = ({
|
|
|
1831
1831
|
Qe(`${j} action not supported`);
|
|
1832
1832
|
return;
|
|
1833
1833
|
}
|
|
1834
|
-
const { ids: W } = N || {}, M = W || [],
|
|
1834
|
+
const { ids: W } = N || {}, M = W || [], Y = typeof R == "string" ? St({
|
|
1835
1835
|
context: R,
|
|
1836
1836
|
fields: S,
|
|
1837
1837
|
values: _
|
|
@@ -1842,7 +1842,7 @@ const Rt = ({
|
|
|
1842
1842
|
name: K,
|
|
1843
1843
|
datas: N,
|
|
1844
1844
|
ids: M,
|
|
1845
|
-
context: { ...x, ...
|
|
1845
|
+
context: { ...x, ...Y }
|
|
1846
1846
|
});
|
|
1847
1847
|
l(!0), s.current = !0, r.current = setInterval(() => {
|
|
1848
1848
|
w(z);
|
|
@@ -2135,7 +2135,7 @@ function qa(e, t) {
|
|
|
2135
2135
|
defaultValues: C,
|
|
2136
2136
|
forcedValues: O = {},
|
|
2137
2137
|
parentWidth: V
|
|
2138
|
-
} = e, { t: I } = he(), [S, _] = b(!1), [x, R] = b(), [A, N] = b(), [K] = ct.useForm(), [j, W] = b(), [M,
|
|
2138
|
+
} = e, { t: I } = he(), [S, _] = b(!1), [x, R] = b(), [A, N] = b(), [K] = ct.useForm(), [j, W] = b(), [M, Y] = b(), z = te(Fo), [Q, U] = b(), [H, E] = b(!1), L = re(), $ = re({}), de = re({}), Z = re(!1), oe = re(!1), ve = re(!1), ae = (V !== void 0 ? V : Q) < Ya, xe = te($e), { activeId: De, getPlainValues: Ee } = xe || {}, ke = te(
|
|
2139
2139
|
nt
|
|
2140
2140
|
), {
|
|
2141
2141
|
setFormIsSaving: ue = void 0,
|
|
@@ -2145,9 +2145,9 @@ function qa(e, t) {
|
|
|
2145
2145
|
setAttachments: me = void 0,
|
|
2146
2146
|
title: Me = void 0,
|
|
2147
2147
|
setTitle: He = void 0
|
|
2148
|
-
} = (F ? ke : {}) || {},
|
|
2148
|
+
} = (F ? ke : {}) || {}, G = te(
|
|
2149
2149
|
Ht
|
|
2150
|
-
), { processAction: Se, globalValues: _e } =
|
|
2150
|
+
), { processAction: Se, globalValues: _e } = G || {};
|
|
2151
2151
|
ht(t, () => ({
|
|
2152
2152
|
submitForm: on,
|
|
2153
2153
|
getFields: We,
|
|
@@ -2168,12 +2168,12 @@ function qa(e, t) {
|
|
|
2168
2168
|
(o === void 0 && M || o !== void 0 && M && o < 0) && (L.current = void 0, N(void 0)), Wt();
|
|
2169
2169
|
}
|
|
2170
2170
|
}, [o, n, h, m, T]), fe(() => {
|
|
2171
|
-
|
|
2171
|
+
H && (Sn({
|
|
2172
2172
|
elementHasLostFocus: !0
|
|
2173
2173
|
}), E(!1));
|
|
2174
|
-
}, [
|
|
2175
|
-
const ge = (P,
|
|
2176
|
-
Fe == null || Fe(!1), ue == null || ue(!1), s == null || s(P,
|
|
2174
|
+
}, [H]);
|
|
2175
|
+
const ge = (P, B, ee, ne) => {
|
|
2176
|
+
Fe == null || Fe(!1), ue == null || ue(!1), s == null || s(P, B, ee, ne), Le == null || Le(P);
|
|
2177
2177
|
}, be = () => {
|
|
2178
2178
|
ue == null || ue(!1), r == null || r();
|
|
2179
2179
|
}, pe = (P) => {
|
|
@@ -2190,23 +2190,23 @@ function qa(e, t) {
|
|
|
2190
2190
|
...Ye(M),
|
|
2191
2191
|
...Oe()
|
|
2192
2192
|
};
|
|
2193
|
-
for (const
|
|
2194
|
-
P[
|
|
2193
|
+
for (const B in P)
|
|
2194
|
+
P[B] === void 0 && delete P[B];
|
|
2195
2195
|
return P;
|
|
2196
2196
|
}
|
|
2197
2197
|
function q() {
|
|
2198
|
-
const P = Pe(),
|
|
2198
|
+
const P = Pe(), B = We(), ee = {};
|
|
2199
2199
|
return Object.keys(P).forEach((ne) => {
|
|
2200
2200
|
const we = P[ne];
|
|
2201
|
-
|
|
2201
|
+
B[ne] && B[ne].type === "many2one" && we && Array.isArray(we) && we.length === 2 ? ee[ne] = we[0] : B[ne] && (B[ne].type === "one2many" || B[ne].type === "many2many") && we && we.items ? ee[ne] = we.items.filter((Ue) => Ue.operation !== "pendingRemove").map((Ue) => Ue.id) : ee[ne] = we;
|
|
2202
2202
|
}), ee;
|
|
2203
2203
|
}
|
|
2204
2204
|
function ce() {
|
|
2205
2205
|
const P = {
|
|
2206
2206
|
...Ye(M)
|
|
2207
2207
|
};
|
|
2208
|
-
for (const
|
|
2209
|
-
P[
|
|
2208
|
+
for (const B in P)
|
|
2209
|
+
P[B] === void 0 && delete P[B];
|
|
2210
2210
|
return P;
|
|
2211
2211
|
}
|
|
2212
2212
|
function Re() {
|
|
@@ -2225,11 +2225,11 @@ function qa(e, t) {
|
|
|
2225
2225
|
};
|
|
2226
2226
|
}
|
|
2227
2227
|
const Ae = async (P) => {
|
|
2228
|
-
const
|
|
2228
|
+
const B = se() ? A == null ? void 0 : A.context : {};
|
|
2229
2229
|
return await k.getHandler().defaultGet({
|
|
2230
2230
|
model: n,
|
|
2231
2231
|
fields: P,
|
|
2232
|
-
context: { ...w, ...
|
|
2232
|
+
context: { ...w, ...B },
|
|
2233
2233
|
extraValues: C
|
|
2234
2234
|
});
|
|
2235
2235
|
}, tt = () => Object.keys(
|
|
@@ -2239,13 +2239,13 @@ function qa(e, t) {
|
|
|
2239
2239
|
fields: M
|
|
2240
2240
|
})
|
|
2241
2241
|
).length !== 0, Ye = (P) => {
|
|
2242
|
-
const
|
|
2243
|
-
return At(
|
|
2244
|
-
}, Ct = (P,
|
|
2242
|
+
const B = K.getFieldsValue(!0);
|
|
2243
|
+
return At(B, P);
|
|
2244
|
+
}, Ct = (P, B) => {
|
|
2245
2245
|
ut({
|
|
2246
2246
|
values: {
|
|
2247
2247
|
...At(K.getFieldsValue(!0), M),
|
|
2248
|
-
[P]:
|
|
2248
|
+
[P]: B
|
|
2249
2249
|
},
|
|
2250
2250
|
fields: M,
|
|
2251
2251
|
reset: !1
|
|
@@ -2263,25 +2263,25 @@ function qa(e, t) {
|
|
|
2263
2263
|
let P;
|
|
2264
2264
|
try {
|
|
2265
2265
|
m ? P = { arch: m.arch, fields: m.fields } : P = await ot();
|
|
2266
|
-
const { fields:
|
|
2267
|
-
|
|
2268
|
-
fields:
|
|
2266
|
+
const { fields: B, arch: ee } = P;
|
|
2267
|
+
Y(B), W(ee), await lt({
|
|
2268
|
+
fields: B,
|
|
2269
2269
|
arch: ee
|
|
2270
2270
|
});
|
|
2271
|
-
} catch (
|
|
2272
|
-
R(
|
|
2271
|
+
} catch (B) {
|
|
2272
|
+
R(B != null && B.message ? B.message + B.stack : B), le == null || le(!1);
|
|
2273
2273
|
}
|
|
2274
2274
|
}, lt = async (P) => {
|
|
2275
|
-
let
|
|
2276
|
-
le == null || le(!0), R(void 0), P != null && P.fields ? (ee = P.fields, ne = P.arch) : (ee = M, ne = j), h && (P == null ? void 0 : P.forceRefresh) !== !0 ?
|
|
2275
|
+
let B, ee, ne, we;
|
|
2276
|
+
le == null || le(!0), R(void 0), P != null && P.fields ? (ee = P.fields, ne = P.arch) : (ee = M, ne = j), h && (P == null ? void 0 : P.forceRefresh) !== !0 ? B = h : { values: B, defaultGetCalled: we } = await ni({
|
|
2277
2277
|
fields: ee,
|
|
2278
2278
|
arch: ne
|
|
2279
|
-
}), v && (
|
|
2280
|
-
values:
|
|
2279
|
+
}), v && (B = { ...Ca(v), ...B }), $.current = At(B, ee), ut({
|
|
2280
|
+
values: B,
|
|
2281
2281
|
fields: ee,
|
|
2282
2282
|
reset: !0,
|
|
2283
2283
|
isDefaultGet: we
|
|
2284
|
-
}), Ut({ fields: ee, arch: ne, values:
|
|
2284
|
+
}), Ut({ fields: ee, arch: ne, values: B }), le == null || le(!1), Fe == null || Fe(!1), we && E(!0);
|
|
2285
2285
|
}, Be = async () => new Promise(async (P) => {
|
|
2286
2286
|
tt() ? $t({
|
|
2287
2287
|
t: I,
|
|
@@ -2307,11 +2307,11 @@ function qa(e, t) {
|
|
|
2307
2307
|
});
|
|
2308
2308
|
}, ut = ({
|
|
2309
2309
|
values: P,
|
|
2310
|
-
fields:
|
|
2310
|
+
fields: B,
|
|
2311
2311
|
reset: ee,
|
|
2312
2312
|
isDefaultGet: ne = !1
|
|
2313
2313
|
}) => {
|
|
2314
|
-
const Ue = { ...ee ? {} : K.getFieldsValue(!0), ...P }, In = At(Ue,
|
|
2314
|
+
const Ue = { ...ee ? {} : K.getFieldsValue(!0), ...P }, In = At(Ue, B), pi = Object.keys(B).map((Fn) => {
|
|
2315
2315
|
const hi = In[Fn] !== void 0 ? In[Fn] : void 0;
|
|
2316
2316
|
return {
|
|
2317
2317
|
name: Fn,
|
|
@@ -2322,12 +2322,12 @@ function qa(e, t) {
|
|
|
2322
2322
|
ne || (de.current = In), K.setFields(pi);
|
|
2323
2323
|
}, ni = async ({
|
|
2324
2324
|
fields: P,
|
|
2325
|
-
arch:
|
|
2325
|
+
arch: B
|
|
2326
2326
|
}) => {
|
|
2327
2327
|
let ee = {}, ne = !1;
|
|
2328
2328
|
if (se()) {
|
|
2329
2329
|
const we = A || gr({
|
|
2330
|
-
arch:
|
|
2330
|
+
arch: B,
|
|
2331
2331
|
fields: P,
|
|
2332
2332
|
values: {}
|
|
2333
2333
|
});
|
|
@@ -2352,7 +2352,7 @@ function qa(e, t) {
|
|
|
2352
2352
|
me == null || me([]), ee = await Ae(P), ne = !0;
|
|
2353
2353
|
return { values: ee, defaultGetCalled: ne };
|
|
2354
2354
|
}, hr = async (P) => {
|
|
2355
|
-
const { callOnSubmitSucceed:
|
|
2355
|
+
const { callOnSubmitSucceed: B = !0 } = P || {};
|
|
2356
2356
|
if (se()) {
|
|
2357
2357
|
const ee = Rn({
|
|
2358
2358
|
source: $.current,
|
|
@@ -2381,12 +2381,12 @@ function qa(e, t) {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
L.current = ne, $.current = ee;
|
|
2383
2383
|
}
|
|
2384
|
-
g && await g([se()]), !y &&
|
|
2384
|
+
g && await g([se()]), !y && B && (ge == null || ge(se(), Pe(), ce()));
|
|
2385
2385
|
}, ri = async (P) => {
|
|
2386
|
-
const { callOnSubmitSucceed:
|
|
2387
|
-
!y &&
|
|
2386
|
+
const { callOnSubmitSucceed: B = !0 } = P || {};
|
|
2387
|
+
!y && B && (ge == null || ge(se(), Pe(), ce()));
|
|
2388
2388
|
}, on = async (P) => {
|
|
2389
|
-
let
|
|
2389
|
+
let B = !1;
|
|
2390
2390
|
const { callOnSubmitSucceed: ee = !0 } = P || {};
|
|
2391
2391
|
if (oe.current = !0, R(void 0), ve.current && !tt() && se() && ee) {
|
|
2392
2392
|
oe.current = !1, Fe == null || Fe(!1), ge == null || ge(
|
|
@@ -2404,21 +2404,21 @@ function qa(e, t) {
|
|
|
2404
2404
|
return oe.current = !1, Er(I), { succeed: !1, id: se() };
|
|
2405
2405
|
_(!0), ue == null || ue(!0);
|
|
2406
2406
|
try {
|
|
2407
|
-
p === "api" ? await hr(P) : await ri(P), c && (L.current = void 0, ut({ values: {}, fields: M, reset: !0 })), await lt({ forceRefresh: !0 }),
|
|
2407
|
+
p === "api" ? await hr(P) : await ri(P), c && (L.current = void 0, ut({ values: {}, fields: M, reset: !0 })), await lt({ forceRefresh: !0 }), B = !0, On.success(I("savedRegisters"));
|
|
2408
2408
|
} catch (ne) {
|
|
2409
2409
|
oe.current = !1, _(!1), ue == null || ue(!1), pe == null || pe(ne), On.error(I("errorWhileSavingForm")), R(ne != null && ne.message ? ne.message : ne);
|
|
2410
2410
|
} finally {
|
|
2411
2411
|
oe.current = !1, ue == null || ue(!1), _(!1);
|
|
2412
2412
|
}
|
|
2413
|
-
return { succeed:
|
|
2413
|
+
return { succeed: B, id: se() };
|
|
2414
2414
|
}, gr = ({
|
|
2415
2415
|
fields: P,
|
|
2416
|
-
arch:
|
|
2416
|
+
arch: B,
|
|
2417
2417
|
values: ee,
|
|
2418
2418
|
operationInProgress: ne = !1
|
|
2419
2419
|
}) => {
|
|
2420
2420
|
const we = new Zr(P);
|
|
2421
|
-
return we.parse(
|
|
2421
|
+
return we.parse(B, {
|
|
2422
2422
|
readOnly: u || ne,
|
|
2423
2423
|
values: da(
|
|
2424
2424
|
{
|
|
@@ -2430,13 +2430,13 @@ function qa(e, t) {
|
|
|
2430
2430
|
}), we;
|
|
2431
2431
|
}, Ut = ({
|
|
2432
2432
|
fields: P,
|
|
2433
|
-
arch:
|
|
2433
|
+
arch: B,
|
|
2434
2434
|
values: ee,
|
|
2435
2435
|
operationInProgress: ne = !1
|
|
2436
2436
|
}) => {
|
|
2437
2437
|
var Ue;
|
|
2438
2438
|
const we = gr({
|
|
2439
|
-
arch:
|
|
2439
|
+
arch: B,
|
|
2440
2440
|
fields: P,
|
|
2441
2441
|
values: ee,
|
|
2442
2442
|
operationInProgress: ne
|
|
@@ -2447,11 +2447,11 @@ function qa(e, t) {
|
|
|
2447
2447
|
}) => {
|
|
2448
2448
|
if (oe.current)
|
|
2449
2449
|
return;
|
|
2450
|
-
const
|
|
2450
|
+
const B = Rn({
|
|
2451
2451
|
source: de.current,
|
|
2452
2452
|
target: Ye(M),
|
|
2453
2453
|
fields: M
|
|
2454
|
-
}), ee = Object.keys(
|
|
2454
|
+
}), ee = Object.keys(B);
|
|
2455
2455
|
if (ee.length !== 0 && !(va({
|
|
2456
2456
|
changedFields: ee,
|
|
2457
2457
|
formOoui: A,
|
|
@@ -2472,16 +2472,16 @@ function qa(e, t) {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
}, oi = os(Sn, 100), ii = async (P) => {
|
|
2474
2474
|
try {
|
|
2475
|
-
for (let
|
|
2476
|
-
const ee = P[
|
|
2475
|
+
for (let B = 0; B < P.length; B += 1) {
|
|
2476
|
+
const ee = P[B];
|
|
2477
2477
|
await si(ee);
|
|
2478
2478
|
}
|
|
2479
|
-
} catch (
|
|
2480
|
-
Qe(
|
|
2479
|
+
} catch (B) {
|
|
2480
|
+
Qe(B);
|
|
2481
2481
|
}
|
|
2482
2482
|
}, si = async (P) => {
|
|
2483
|
-
const
|
|
2484
|
-
if (!
|
|
2483
|
+
const B = A == null ? void 0 : A.onChangeFields[P];
|
|
2484
|
+
if (!B) {
|
|
2485
2485
|
Ut({
|
|
2486
2486
|
fields: M,
|
|
2487
2487
|
arch: j,
|
|
@@ -2498,10 +2498,10 @@ function qa(e, t) {
|
|
|
2498
2498
|
}
|
|
2499
2499
|
},
|
|
2500
2500
|
parentValues: Ee == null ? void 0 : Ee(),
|
|
2501
|
-
onChangeFieldActionArgs:
|
|
2501
|
+
onChangeFieldActionArgs: B.args
|
|
2502
2502
|
}), ne = await k.getHandler().executeOnChange({
|
|
2503
2503
|
model: n,
|
|
2504
|
-
action:
|
|
2504
|
+
action: B.method,
|
|
2505
2505
|
ids: se() ? [se()] : [],
|
|
2506
2506
|
payload: ee,
|
|
2507
2507
|
fields: M
|
|
@@ -2539,12 +2539,12 @@ function qa(e, t) {
|
|
|
2539
2539
|
fields: we,
|
|
2540
2540
|
arch: j,
|
|
2541
2541
|
values: Ye(we)
|
|
2542
|
-
}),
|
|
2542
|
+
}), Y(we);
|
|
2543
2543
|
}
|
|
2544
2544
|
};
|
|
2545
2545
|
async function ai({
|
|
2546
2546
|
action: P,
|
|
2547
|
-
context:
|
|
2547
|
+
context: B
|
|
2548
2548
|
}) {
|
|
2549
2549
|
const ee = await k.getHandler().execute({
|
|
2550
2550
|
model: n,
|
|
@@ -2553,7 +2553,7 @@ function qa(e, t) {
|
|
|
2553
2553
|
context: {
|
|
2554
2554
|
...A == null ? void 0 : A.context,
|
|
2555
2555
|
...w,
|
|
2556
|
-
...
|
|
2556
|
+
...B
|
|
2557
2557
|
}
|
|
2558
2558
|
});
|
|
2559
2559
|
if (typeof ee == "object" && ee !== null && Object.keys(ee).length === 0 && y)
|
|
@@ -2568,33 +2568,33 @@ function qa(e, t) {
|
|
|
2568
2568
|
values: Pe()
|
|
2569
2569
|
})), await yr({
|
|
2570
2570
|
actionData: ee,
|
|
2571
|
-
context: { ...
|
|
2571
|
+
context: { ...B, ...ne }
|
|
2572
2572
|
});
|
|
2573
2573
|
} else
|
|
2574
2574
|
await lt({ forceRefresh: !0 });
|
|
2575
2575
|
}
|
|
2576
2576
|
async function li({ action: P }) {
|
|
2577
|
-
const
|
|
2577
|
+
const B = await k.getHandler().executeWorkflow({
|
|
2578
2578
|
model: n,
|
|
2579
2579
|
action: P,
|
|
2580
2580
|
payload: se()
|
|
2581
2581
|
});
|
|
2582
|
-
|
|
2582
|
+
B.type && B.type === "ir.actions.act_window_close" ? ge == null || ge(se(), Pe(), ce()) : await lt({ forceRefresh: !0 });
|
|
2583
2583
|
}
|
|
2584
2584
|
async function ci({
|
|
2585
2585
|
action: P,
|
|
2586
|
-
context:
|
|
2586
|
+
context: B
|
|
2587
2587
|
}) {
|
|
2588
2588
|
const ee = (await k.getHandler().readObjects({
|
|
2589
2589
|
model: "ir.actions.actions",
|
|
2590
2590
|
ids: [parseInt(P)],
|
|
2591
2591
|
context: w
|
|
2592
2592
|
}))[0];
|
|
2593
|
-
await yr({ actionData: ee, context:
|
|
2593
|
+
await yr({ actionData: ee, context: B });
|
|
2594
2594
|
}
|
|
2595
2595
|
async function yr({
|
|
2596
2596
|
actionData: P,
|
|
2597
|
-
context:
|
|
2597
|
+
context: B
|
|
2598
2598
|
}) {
|
|
2599
2599
|
const { closeParent: ee } = await (Se == null ? void 0 : Se({
|
|
2600
2600
|
actionData: P,
|
|
@@ -2603,7 +2603,7 @@ function qa(e, t) {
|
|
|
2603
2603
|
context: {
|
|
2604
2604
|
...w,
|
|
2605
2605
|
...A == null ? void 0 : A.context,
|
|
2606
|
-
...
|
|
2606
|
+
...B
|
|
2607
2607
|
},
|
|
2608
2608
|
onRefreshParentValues: () => {
|
|
2609
2609
|
lt({ forceRefresh: !0 });
|
|
@@ -2624,7 +2624,7 @@ function qa(e, t) {
|
|
|
2624
2624
|
}
|
|
2625
2625
|
async function ui({
|
|
2626
2626
|
type: P,
|
|
2627
|
-
action:
|
|
2627
|
+
action: B,
|
|
2628
2628
|
context: ee
|
|
2629
2629
|
}) {
|
|
2630
2630
|
if (P === "cancel") {
|
|
@@ -2639,7 +2639,7 @@ function qa(e, t) {
|
|
|
2639
2639
|
try {
|
|
2640
2640
|
!u && (tt() || se() === void 0) && (ne = !0, Tn(!0), p === "2many" ? (await hr({ callOnSubmitSucceed: !1 }), ve.current = !0) : await on({ callOnSubmitSucceed: !1 }));
|
|
2641
2641
|
const we = ve.current ? Te() : {}, Ue = { ...ee, ...we };
|
|
2642
|
-
P === "object" ? await ai({ action:
|
|
2642
|
+
P === "object" ? await ai({ action: B, context: Ue }) : P === "workflow" ? await li({ action: B }) : P === "action" && await ci({ action: B, context: Ue }), ne && Tn(!1);
|
|
2643
2643
|
} catch (we) {
|
|
2644
2644
|
ne && Tn(!1), Qe(we);
|
|
2645
2645
|
}
|
|
@@ -2714,8 +2714,8 @@ function qa(e, t) {
|
|
|
2714
2714
|
{
|
|
2715
2715
|
bounds: !0,
|
|
2716
2716
|
onResize: (P) => {
|
|
2717
|
-
var
|
|
2718
|
-
|
|
2717
|
+
var B;
|
|
2718
|
+
U((B = P.bounds) == null ? void 0 : B.width);
|
|
2719
2719
|
},
|
|
2720
2720
|
children: ({ measureRef: P }) => /* @__PURE__ */ D("div", { className: "pb-2", ref: P, children: [
|
|
2721
2721
|
x && /* @__PURE__ */ i(Ua, { className: "mt-5 mb-10", error: x }),
|
|
@@ -3353,7 +3353,7 @@ const Tl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(_o,
|
|
|
3353
3353
|
onItemClick: t,
|
|
3354
3354
|
onOpenChange: n
|
|
3355
3355
|
}) => {
|
|
3356
|
-
const [o, r] = b(!1), [s, a] = b(!1), { t: l } = he(), [d, f] = b(), u =
|
|
3356
|
+
const [o, r] = b(!1), [s, a] = b(!1), { t: l } = he(), [d, f] = b(), u = J(async () => {
|
|
3357
3357
|
const {
|
|
3358
3358
|
actionItems: c = [],
|
|
3359
3359
|
relateItems: p = [],
|
|
@@ -3429,7 +3429,7 @@ const Tl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(_o,
|
|
|
3429
3429
|
fe(() => () => {
|
|
3430
3430
|
o();
|
|
3431
3431
|
}, []);
|
|
3432
|
-
const n =
|
|
3432
|
+
const n = J(
|
|
3433
3433
|
async (r, s) => {
|
|
3434
3434
|
var d;
|
|
3435
3435
|
const a = s || ar();
|
|
@@ -3445,7 +3445,7 @@ const Tl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(_o,
|
|
|
3445
3445
|
}
|
|
3446
3446
|
},
|
|
3447
3447
|
[e]
|
|
3448
|
-
), o =
|
|
3448
|
+
), o = J((r) => {
|
|
3449
3449
|
var s;
|
|
3450
3450
|
r ? ((s = t.current.get(r)) == null || s.abort(), t.current.delete(r)) : (t.current.forEach((a) => a.abort()), t.current.clear());
|
|
3451
3451
|
}, []);
|
|
@@ -3459,9 +3459,9 @@ const Tl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(_o,
|
|
|
3459
3459
|
k.getHandler().getView
|
|
3460
3460
|
), [m, g] = Xe(
|
|
3461
3461
|
k.getHandler().readObjects
|
|
3462
|
-
), y =
|
|
3462
|
+
), y = J(() => {
|
|
3463
3463
|
h(), g();
|
|
3464
|
-
}, [h, g]), w =
|
|
3464
|
+
}, [h, g]), w = J(async () => {
|
|
3465
3465
|
var O;
|
|
3466
3466
|
const T = await p({
|
|
3467
3467
|
model: n,
|
|
@@ -3545,7 +3545,7 @@ const Tl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(_o,
|
|
|
3545
3545
|
/* @__PURE__ */ i(ur, { id: t.id, model: t.model })
|
|
3546
3546
|
] }) : /* @__PURE__ */ i(ie, {});
|
|
3547
3547
|
}, Vl = (e) => {
|
|
3548
|
-
const { value: t, context: n, selectionValues: o } = e, [r, s] = b(), [a, l] = b(!1), [d, f] = t ? t.split(",") : [], u = parseInt(f), c =
|
|
3548
|
+
const { value: t, context: n, selectionValues: o } = e, [r, s] = b(), [a, l] = b(!1), [d, f] = t ? t.split(",") : [], u = parseInt(f), c = J(async () => {
|
|
3549
3549
|
if (!t || t && r)
|
|
3550
3550
|
return;
|
|
3551
3551
|
l(!0);
|
|
@@ -3724,7 +3724,7 @@ const _l = (e) => {
|
|
|
3724
3724
|
ooui: n,
|
|
3725
3725
|
context: o
|
|
3726
3726
|
}) => {
|
|
3727
|
-
const [r, s] = b([]), [a, l] = b(!1), { relation: d, field: f } = n, u =
|
|
3727
|
+
const [r, s] = b([]), [a, l] = b(!1), { relation: d, field: f } = n, u = J(async () => {
|
|
3728
3728
|
try {
|
|
3729
3729
|
l(!0);
|
|
3730
3730
|
const p = await k.getHandler().search({
|
|
@@ -3809,7 +3809,7 @@ const _l = (e) => {
|
|
|
3809
3809
|
onSelectAllRecords: V
|
|
3810
3810
|
} = e, I = re(null), [S, _] = b([]), x = re(!1), [R, A] = b(), { t: N } = he(), K = re(o), j = te(
|
|
3811
3811
|
nt
|
|
3812
|
-
), { title: W = void 0, setTitle: M = void 0 } = (F ? j : {}) || {},
|
|
3812
|
+
), { title: W = void 0, setTitle: M = void 0 } = (F ? j : {}) || {}, Y = Ie(() => {
|
|
3813
3813
|
if (R)
|
|
3814
3814
|
return Co(
|
|
3815
3815
|
R,
|
|
@@ -3836,7 +3836,7 @@ const _l = (e) => {
|
|
|
3836
3836
|
}, [a]), fe(() => {
|
|
3837
3837
|
K.current = o;
|
|
3838
3838
|
}, [o]);
|
|
3839
|
-
const z = (n - 1) * K.current + 1,
|
|
3839
|
+
const z = (n - 1) * K.current + 1, Q = z - 1 + S.length, U = r === void 0 ? null : r === 0 ? N("no_results") : N("summary").replace("{from}", z == null ? void 0 : z.toString()).replace("{to}", Q == null ? void 0 : Q.toString()).replace("{total}", r == null ? void 0 : r.toString()), H = Ie(() => {
|
|
3840
3840
|
if (!u || s.isExpandable)
|
|
3841
3841
|
return null;
|
|
3842
3842
|
const Z = S == null ? void 0 : S.filter(
|
|
@@ -3863,7 +3863,7 @@ const _l = (e) => {
|
|
|
3863
3863
|
onSelectAllRecords: V
|
|
3864
3864
|
}
|
|
3865
3865
|
) }),
|
|
3866
|
-
/* @__PURE__ */ i(ye, { span: V ? 8 : 12, className: "text-right", children:
|
|
3866
|
+
/* @__PURE__ */ i(ye, { span: V ? 8 : 12, className: "text-right", children: U })
|
|
3867
3867
|
] });
|
|
3868
3868
|
}, [
|
|
3869
3869
|
S,
|
|
@@ -3873,26 +3873,26 @@ const _l = (e) => {
|
|
|
3873
3873
|
n,
|
|
3874
3874
|
c,
|
|
3875
3875
|
u,
|
|
3876
|
-
|
|
3876
|
+
U,
|
|
3877
3877
|
r,
|
|
3878
3878
|
s.isExpandable
|
|
3879
3879
|
]), E = Ie(() => {
|
|
3880
3880
|
if (!R)
|
|
3881
3881
|
return null;
|
|
3882
|
-
const Z = R.columns.filter((
|
|
3882
|
+
const Z = R.columns.filter((X) => X.sum !== void 0).map((X) => ({ label: X.sum, field: X.id }));
|
|
3883
3883
|
if (!Z || Z.length === 0)
|
|
3884
3884
|
return null;
|
|
3885
|
-
const oe = [], ve = (c == null ? void 0 : c.length) > 0 ? S.filter((
|
|
3886
|
-
return Z.forEach((
|
|
3887
|
-
const ae = ve.reduce((xe, De) => De[
|
|
3888
|
-
oe.push(`${
|
|
3885
|
+
const oe = [], ve = (c == null ? void 0 : c.length) > 0 ? S.filter((X) => c.includes(X.id)) : S;
|
|
3886
|
+
return Z.forEach((X) => {
|
|
3887
|
+
const ae = ve.reduce((xe, De) => De[X.field] && !isNaN(De[X.field]) ? xe + De[X.field] : xe, 0);
|
|
3888
|
+
oe.push(`${X.label}: ${Math.round(ae * 100) / 100}`);
|
|
3889
3889
|
}), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
|
|
3890
3890
|
}, [S, c, R]), L = Ie(() => {
|
|
3891
|
-
if (R !== null &&
|
|
3892
|
-
return bl(
|
|
3893
|
-
}, [
|
|
3891
|
+
if (R !== null && Y && Y.length > 0)
|
|
3892
|
+
return bl(Y, S, 600);
|
|
3893
|
+
}, [Y, S, R]), $ = Ie(() => h && (R != null && R.columns.some((Z) => Z.sum !== void 0)) ? h - 30 : h, [h, R == null ? void 0 : R.columns]);
|
|
3894
3894
|
return R === null || !L || ((de = L == null ? void 0 : L.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ i(je, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(mo, { children: [
|
|
3895
|
-
|
|
3895
|
+
H,
|
|
3896
3896
|
/* @__PURE__ */ i(
|
|
3897
3897
|
gs,
|
|
3898
3898
|
{
|
|
@@ -3956,12 +3956,12 @@ const ko = (e) => {
|
|
|
3956
3956
|
searchParams: O = [],
|
|
3957
3957
|
setSearchValues: V,
|
|
3958
3958
|
clearSelection: I
|
|
3959
|
-
} = e, [S, _] = b(!1), [x, R] = b(!1), [A, N] = b(), [K, j] = b(1), [W, M] = b(0), [
|
|
3959
|
+
} = e, [S, _] = b(!1), [x, R] = b(!1), [A, N] = b(), [K, j] = b(1), [W, M] = b(0), [Y, z] = b(), [Q, U] = b([]), [H, E] = b(void 0), [L, $] = b(void 0), de = re(F || Ft), Z = re([]), oe = J(
|
|
3960
3960
|
(le) => {
|
|
3961
|
-
y == null || y([...le]),
|
|
3961
|
+
y == null || y([...le]), U([...le]);
|
|
3962
3962
|
},
|
|
3963
3963
|
[y]
|
|
3964
|
-
), ve =
|
|
3964
|
+
), ve = J(() => w || Q, [w, Q]), X = J(async () => {
|
|
3965
3965
|
const le = await k.getHandler().nameSearch({
|
|
3966
3966
|
model: t,
|
|
3967
3967
|
payload: l,
|
|
@@ -3970,15 +3970,15 @@ const ko = (e) => {
|
|
|
3970
3970
|
context: f
|
|
3971
3971
|
});
|
|
3972
3972
|
if (z(le.length), u == null || u(le.length), le.length > 0) {
|
|
3973
|
-
const me = le.map((pe) => pe == null ? void 0 : pe[0]), { colors: Me, status: He } = Tt(c),
|
|
3974
|
-
Me && (
|
|
3973
|
+
const me = le.map((pe) => pe == null ? void 0 : pe[0]), { colors: Me, status: He } = Tt(c), G = {};
|
|
3974
|
+
Me && (G.colors = Me), He && (G.status = He);
|
|
3975
3975
|
const Se = await k.getHandler().readEvalUiObjects({
|
|
3976
3976
|
model: t,
|
|
3977
3977
|
ids: me,
|
|
3978
3978
|
arch: c == null ? void 0 : c.arch,
|
|
3979
3979
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
3980
3980
|
context: f,
|
|
3981
|
-
attrs:
|
|
3981
|
+
attrs: G
|
|
3982
3982
|
}), _e = Se[0];
|
|
3983
3983
|
Z.current = [..._e], E(zt(Se[1])), $(_r(Se[1]));
|
|
3984
3984
|
const ge = _e.map((pe) => pe.id), be = h !== void 0 ? kt({
|
|
@@ -4002,10 +4002,10 @@ const ko = (e) => {
|
|
|
4002
4002
|
h,
|
|
4003
4003
|
g,
|
|
4004
4004
|
u
|
|
4005
|
-
]), ae =
|
|
4005
|
+
]), ae = J(
|
|
4006
4006
|
async (le) => {
|
|
4007
|
-
const { params: me, newOffset: Me } = le || {}, He = Xt(me || O, v), { colors:
|
|
4008
|
-
|
|
4007
|
+
const { params: me, newOffset: Me } = le || {}, He = Xt(me || O, v), { colors: G, status: Se } = Tt(c), _e = {};
|
|
4008
|
+
G && (_e.colors = G), Se && (_e.status = Se);
|
|
4009
4009
|
const { totalItems: ge, results: be, attrsEvaluated: pe } = await k.getHandler().searchForTree({
|
|
4010
4010
|
params: He,
|
|
4011
4011
|
limit: de.current,
|
|
@@ -4047,10 +4047,10 @@ const ko = (e) => {
|
|
|
4047
4047
|
W,
|
|
4048
4048
|
O
|
|
4049
4049
|
]
|
|
4050
|
-
), xe =
|
|
4050
|
+
), xe = J(
|
|
4051
4051
|
async (le) => {
|
|
4052
4052
|
try {
|
|
4053
|
-
_(!0), a == null || a(!0), l && !d.current ? await
|
|
4053
|
+
_(!0), a == null || a(!0), l && !d.current ? await X() : await ae(le), I == null || I();
|
|
4054
4054
|
} catch (me) {
|
|
4055
4055
|
N(typeof me == "string" ? me : me.message), _(!1);
|
|
4056
4056
|
} finally {
|
|
@@ -4060,13 +4060,13 @@ const ko = (e) => {
|
|
|
4060
4060
|
[
|
|
4061
4061
|
I,
|
|
4062
4062
|
l,
|
|
4063
|
-
|
|
4063
|
+
X,
|
|
4064
4064
|
d,
|
|
4065
4065
|
ae,
|
|
4066
4066
|
o,
|
|
4067
4067
|
a
|
|
4068
4068
|
]
|
|
4069
|
-
), De =
|
|
4069
|
+
), De = J(
|
|
4070
4070
|
(le) => {
|
|
4071
4071
|
if (JSON.stringify(le) === JSON.stringify(h))
|
|
4072
4072
|
return;
|
|
@@ -4086,12 +4086,12 @@ const ko = (e) => {
|
|
|
4086
4086
|
p == null ? void 0 : p.fields,
|
|
4087
4087
|
oe
|
|
4088
4088
|
]
|
|
4089
|
-
), Ee =
|
|
4089
|
+
), Ee = J(
|
|
4090
4090
|
(le) => {
|
|
4091
|
-
const { params: me, searchValues: Me, limit: He, offset:
|
|
4092
|
-
S || (n == null || n(void 0), o == null || o([]), V == null || V(Me), r == null || r(me), s == null || s(!1), R(!0), N(void 0), j(1), He && (de.current = He, C == null || C(He)),
|
|
4091
|
+
const { params: me, searchValues: Me, limit: He, offset: G } = le;
|
|
4092
|
+
S || (n == null || n(void 0), o == null || o([]), V == null || V(Me), r == null || r(me), s == null || s(!1), R(!0), N(void 0), j(1), He && (de.current = He, C == null || C(He)), G && M(G), xe({
|
|
4093
4093
|
params: me,
|
|
4094
|
-
newOffset:
|
|
4094
|
+
newOffset: G
|
|
4095
4095
|
}));
|
|
4096
4096
|
},
|
|
4097
4097
|
[
|
|
@@ -4104,12 +4104,12 @@ const ko = (e) => {
|
|
|
4104
4104
|
xe,
|
|
4105
4105
|
C
|
|
4106
4106
|
]
|
|
4107
|
-
), ke =
|
|
4107
|
+
), ke = J(
|
|
4108
4108
|
(le) => {
|
|
4109
4109
|
_(!0), j(le), M((le - 1) * F);
|
|
4110
4110
|
},
|
|
4111
4111
|
[_, F, M, j]
|
|
4112
|
-
), ue =
|
|
4112
|
+
), ue = J(() => {
|
|
4113
4113
|
S || (n == null || n(void 0), r == null || r([]), V == null || V({}), N(void 0), M(0), j(1), C == null || C(F || Ft));
|
|
4114
4114
|
}, [
|
|
4115
4115
|
S,
|
|
@@ -4118,7 +4118,7 @@ const ko = (e) => {
|
|
|
4118
4118
|
V,
|
|
4119
4119
|
C,
|
|
4120
4120
|
F
|
|
4121
|
-
]), Fe =
|
|
4121
|
+
]), Fe = J(
|
|
4122
4122
|
async (le) => {
|
|
4123
4123
|
const me = le[(c == null ? void 0 : c.field_parent) || "child_id"], Me = await k.getHandler().readObjects({
|
|
4124
4124
|
model: t,
|
|
@@ -4129,12 +4129,12 @@ const ko = (e) => {
|
|
|
4129
4129
|
return oe([...ve(), ...Me]), lr(Tt(c), Me);
|
|
4130
4130
|
},
|
|
4131
4131
|
[c, t, f, ve, oe]
|
|
4132
|
-
), Le =
|
|
4132
|
+
), Le = J(async () => await k.getHandler().searchAllIds({
|
|
4133
4133
|
params: Xt(O, v),
|
|
4134
4134
|
model: t,
|
|
4135
4135
|
context: f,
|
|
4136
|
-
totalItems:
|
|
4137
|
-
}), [t, f,
|
|
4136
|
+
totalItems: Y
|
|
4137
|
+
}), [t, f, Y, O, v]);
|
|
4138
4138
|
return {
|
|
4139
4139
|
submit: Ee,
|
|
4140
4140
|
clear: ue,
|
|
@@ -4149,9 +4149,9 @@ const ko = (e) => {
|
|
|
4149
4149
|
requestPageChange: ke,
|
|
4150
4150
|
changeSort: De,
|
|
4151
4151
|
fetchChildrenForRecord: Fe,
|
|
4152
|
-
colorsForResults:
|
|
4152
|
+
colorsForResults: H,
|
|
4153
4153
|
statusForResults: L,
|
|
4154
|
-
totalItems:
|
|
4154
|
+
totalItems: Y,
|
|
4155
4155
|
getAllIds: Le
|
|
4156
4156
|
};
|
|
4157
4157
|
};
|
|
@@ -4175,11 +4175,11 @@ function Gl(e, t) {
|
|
|
4175
4175
|
nt
|
|
4176
4176
|
), {
|
|
4177
4177
|
setResults: M = void 0,
|
|
4178
|
-
setCurrentItemIndex:
|
|
4178
|
+
setCurrentItemIndex: Y = void 0,
|
|
4179
4179
|
currentId: z = void 0,
|
|
4180
|
-
results:
|
|
4181
|
-
selectedRowItems:
|
|
4182
|
-
setSelectedRowItems:
|
|
4180
|
+
results: Q = void 0,
|
|
4181
|
+
selectedRowItems: U = void 0,
|
|
4182
|
+
setSelectedRowItems: H = void 0,
|
|
4183
4183
|
searchParams: E = [],
|
|
4184
4184
|
setSearchParams: L = void 0,
|
|
4185
4185
|
searchVisible: $ = !0,
|
|
@@ -4187,17 +4187,17 @@ function Gl(e, t) {
|
|
|
4187
4187
|
sorter: Z = void 0,
|
|
4188
4188
|
setSorter: oe = void 0,
|
|
4189
4189
|
setTotalItems: ve = void 0,
|
|
4190
|
-
setSearchTreeNameSearch:
|
|
4190
|
+
setSearchTreeNameSearch: X = void 0,
|
|
4191
4191
|
setTreeIsLoading: ae = void 0,
|
|
4192
4192
|
searchValues: xe = {},
|
|
4193
4193
|
setSearchValues: De = void 0,
|
|
4194
4194
|
limit: Ee = Ft,
|
|
4195
4195
|
setLimit: ke = void 0
|
|
4196
|
-
} = (u ? W : {}) || {}, ue =
|
|
4196
|
+
} = (u ? W : {}) || {}, ue = J(
|
|
4197
4197
|
(Be) => {
|
|
4198
|
-
|
|
4198
|
+
H == null || H(Be.map((ot) => ({ id: ot }))), p == null || p(Be);
|
|
4199
4199
|
},
|
|
4200
|
-
[p,
|
|
4200
|
+
[p, H]
|
|
4201
4201
|
), {
|
|
4202
4202
|
submit: Fe,
|
|
4203
4203
|
clear: Le,
|
|
@@ -4205,7 +4205,7 @@ function Gl(e, t) {
|
|
|
4205
4205
|
tableRefreshing: me,
|
|
4206
4206
|
searchFilterLoading: Me,
|
|
4207
4207
|
searchError: He,
|
|
4208
|
-
page:
|
|
4208
|
+
page: G,
|
|
4209
4209
|
limit: Se,
|
|
4210
4210
|
offset: _e,
|
|
4211
4211
|
getResults: ge,
|
|
@@ -4218,7 +4218,7 @@ function Gl(e, t) {
|
|
|
4218
4218
|
getAllIds: ce
|
|
4219
4219
|
} = ko({
|
|
4220
4220
|
model: T,
|
|
4221
|
-
setSearchTreeNameSearch:
|
|
4221
|
+
setSearchTreeNameSearch: X,
|
|
4222
4222
|
setSelectedRowItems: ue,
|
|
4223
4223
|
setSearchParams: L,
|
|
4224
4224
|
setSearchValues: De,
|
|
@@ -4232,9 +4232,9 @@ function Gl(e, t) {
|
|
|
4232
4232
|
treeView: C,
|
|
4233
4233
|
sorter: Z,
|
|
4234
4234
|
setSorter: oe,
|
|
4235
|
-
setCurrentItemIndex:
|
|
4235
|
+
setCurrentItemIndex: Y,
|
|
4236
4236
|
setResultsActionView: M,
|
|
4237
|
-
resultsActionView:
|
|
4237
|
+
resultsActionView: Q,
|
|
4238
4238
|
domain: d,
|
|
4239
4239
|
currentId: z,
|
|
4240
4240
|
setActionViewTotalItems: ve,
|
|
@@ -4250,7 +4250,7 @@ function Gl(e, t) {
|
|
|
4250
4250
|
getDomain: () => d
|
|
4251
4251
|
})), fe(() => {
|
|
4252
4252
|
g && f && C && (w.current = !1, le());
|
|
4253
|
-
}, [
|
|
4253
|
+
}, [G, _e, g, f, a, C]);
|
|
4254
4254
|
const Re = async () => {
|
|
4255
4255
|
y(!1), m(!0), _(void 0), ae == null || ae(!0);
|
|
4256
4256
|
try {
|
|
@@ -4278,12 +4278,12 @@ function Gl(e, t) {
|
|
|
4278
4278
|
fe(() => {
|
|
4279
4279
|
Re();
|
|
4280
4280
|
}, [n]);
|
|
4281
|
-
const Oe =
|
|
4281
|
+
const Oe = J(
|
|
4282
4282
|
(Be) => {
|
|
4283
4283
|
ke == null || ke(Be);
|
|
4284
4284
|
},
|
|
4285
4285
|
[ke]
|
|
4286
|
-
), Ae =
|
|
4286
|
+
), Ae = J(
|
|
4287
4287
|
async (Be) => {
|
|
4288
4288
|
const { id: ot } = Be;
|
|
4289
4289
|
A.current || (A.current = await k.getHandler().treeButOpen({
|
|
@@ -4303,7 +4303,7 @@ function Gl(e, t) {
|
|
|
4303
4303
|
}));
|
|
4304
4304
|
},
|
|
4305
4305
|
[T, c, j, C]
|
|
4306
|
-
), tt =
|
|
4306
|
+
), tt = J(
|
|
4307
4307
|
async (Be) => {
|
|
4308
4308
|
const { id: ot } = Be;
|
|
4309
4309
|
if (C != null && C.isExpandable) {
|
|
@@ -4322,13 +4322,13 @@ function Gl(e, t) {
|
|
|
4322
4322
|
});
|
|
4323
4323
|
},
|
|
4324
4324
|
[T, V, s, Ae, C]
|
|
4325
|
-
), Ye =
|
|
4325
|
+
), Ye = J(async () => {
|
|
4326
4326
|
const Be = await ce();
|
|
4327
|
-
|
|
4328
|
-
}, [ce, p,
|
|
4329
|
-
() =>
|
|
4330
|
-
[
|
|
4331
|
-
), rn =
|
|
4327
|
+
H == null || H(Be.map((ot) => ({ id: ot }))), p == null || p(Be);
|
|
4328
|
+
}, [ce, p, H]), Ct = Ie(() => C != null && C.isExpandable ? N - 160 : N - (x + 240), [N, x, C == null ? void 0 : C.isExpandable]), at = Ie(
|
|
4329
|
+
() => U == null ? void 0 : U.map((Be) => Be.id),
|
|
4330
|
+
[U]
|
|
4331
|
+
), rn = J(() => !C || !V ? null : /* @__PURE__ */ D(ie, { children: [
|
|
4332
4332
|
/* @__PURE__ */ i(
|
|
4333
4333
|
Ro,
|
|
4334
4334
|
{
|
|
@@ -4356,7 +4356,7 @@ function Gl(e, t) {
|
|
|
4356
4356
|
context: c,
|
|
4357
4357
|
total: q,
|
|
4358
4358
|
limit: Se,
|
|
4359
|
-
page:
|
|
4359
|
+
page: G,
|
|
4360
4360
|
treeView: C,
|
|
4361
4361
|
results: ge(),
|
|
4362
4362
|
onRequestPageChange: be,
|
|
@@ -4389,7 +4389,7 @@ function Gl(e, t) {
|
|
|
4389
4389
|
_e,
|
|
4390
4390
|
tt,
|
|
4391
4391
|
Oe,
|
|
4392
|
-
|
|
4392
|
+
G,
|
|
4393
4393
|
c,
|
|
4394
4394
|
be,
|
|
4395
4395
|
u,
|
|
@@ -4531,13 +4531,13 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4531
4531
|
domain: f
|
|
4532
4532
|
} = o, u = r && !a ? { backgroundColor: Po.colorPrimaryBg } : void 0, [c, p] = b(!1), [h, m] = b(!1), [g, y] = b(!1), [w, v] = b(), T = re(!1), [F, C] = b(""), O = re(), V = te($e), { domain: I, getValues: S, getFields: _, getContext: x, elementHasLostFocus: R } = V || {}, A = re([]), [N, K] = b([]), j = t && t[0] || void 0, W = t && t[1] || "";
|
|
4533
4533
|
fe(() => {
|
|
4534
|
-
!Array.isArray(t) && t &&
|
|
4534
|
+
!Array.isArray(t) && t && U(t);
|
|
4535
4535
|
}, [t]), fe(() => {
|
|
4536
|
-
j && W.length === 0 ?
|
|
4536
|
+
j && W.length === 0 ? U(j) : j && W.length > 0 ? C(W) : !j && !W && C(O.current || "");
|
|
4537
4537
|
}, [t]);
|
|
4538
4538
|
const M = ($) => {
|
|
4539
4539
|
n == null || n($), R == null || R();
|
|
4540
|
-
},
|
|
4540
|
+
}, Y = ($) => {
|
|
4541
4541
|
O.current = $.target.value, M([void 0, ""]);
|
|
4542
4542
|
}, z = async () => {
|
|
4543
4543
|
if (!g && F !== W) {
|
|
@@ -4548,14 +4548,14 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4548
4548
|
y(!0);
|
|
4549
4549
|
try {
|
|
4550
4550
|
if (A.current && A.current.length > 0)
|
|
4551
|
-
|
|
4551
|
+
Q(O.current);
|
|
4552
4552
|
else {
|
|
4553
4553
|
const $ = await k.getHandler().nameSearch({
|
|
4554
4554
|
model: s,
|
|
4555
4555
|
payload: O.current,
|
|
4556
4556
|
context: { ...x == null ? void 0 : x(), ...l }
|
|
4557
4557
|
});
|
|
4558
|
-
$.length === 1 ? (O.current = void 0, M($[0])) :
|
|
4558
|
+
$.length === 1 ? (O.current = void 0, M($[0])) : Q(O.current);
|
|
4559
4559
|
}
|
|
4560
4560
|
} catch ($) {
|
|
4561
4561
|
Qt($);
|
|
@@ -4563,19 +4563,19 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4563
4563
|
y(!1);
|
|
4564
4564
|
}
|
|
4565
4565
|
}
|
|
4566
|
-
},
|
|
4567
|
-
if (await
|
|
4566
|
+
}, Q = async ($) => {
|
|
4567
|
+
if (await H(), A.current && A.current.length > 0) {
|
|
4568
4568
|
const de = await k.getHandler().searchAllIds({
|
|
4569
4569
|
params: A.current,
|
|
4570
4570
|
model: s,
|
|
4571
4571
|
context: { ...x == null ? void 0 : x(), ...l },
|
|
4572
4572
|
totalItems: 2
|
|
4573
4573
|
});
|
|
4574
|
-
de.length === 1 ?
|
|
4574
|
+
de.length === 1 ? U(de[0]) : (v($), p(!0));
|
|
4575
4575
|
return;
|
|
4576
4576
|
}
|
|
4577
4577
|
v($), p(!0);
|
|
4578
|
-
},
|
|
4578
|
+
}, U = async ($) => {
|
|
4579
4579
|
y(!0);
|
|
4580
4580
|
try {
|
|
4581
4581
|
const de = await k.getHandler().execute({
|
|
@@ -4591,7 +4591,7 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4591
4591
|
y(!1);
|
|
4592
4592
|
}
|
|
4593
4593
|
};
|
|
4594
|
-
async function
|
|
4594
|
+
async function H() {
|
|
4595
4595
|
f && (A.current = await k.getHandler().evalDomain({
|
|
4596
4596
|
domain: f,
|
|
4597
4597
|
values: Rt({
|
|
@@ -4617,7 +4617,7 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4617
4617
|
type: "text",
|
|
4618
4618
|
value: F,
|
|
4619
4619
|
disabled: a,
|
|
4620
|
-
onChange:
|
|
4620
|
+
onChange: Y,
|
|
4621
4621
|
style: {
|
|
4622
4622
|
...u,
|
|
4623
4623
|
borderTopRightRadius: 0,
|
|
@@ -4653,7 +4653,7 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4653
4653
|
icon: g ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Zn, {}),
|
|
4654
4654
|
disabled: a || g,
|
|
4655
4655
|
onClick: () => {
|
|
4656
|
-
T.current = !0,
|
|
4656
|
+
T.current = !0, Q(W);
|
|
4657
4657
|
},
|
|
4658
4658
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
4659
4659
|
tabIndex: -1
|
|
@@ -4668,7 +4668,7 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4668
4668
|
visible: c,
|
|
4669
4669
|
nameSearch: j ? void 0 : w,
|
|
4670
4670
|
onSelectValues: ($) => {
|
|
4671
|
-
p(!1),
|
|
4671
|
+
p(!1), U($[0]), T.current = !1, O.current = void 0;
|
|
4672
4672
|
},
|
|
4673
4673
|
onCloseModal: () => {
|
|
4674
4674
|
p(!1), T.current = !1;
|
|
@@ -4683,7 +4683,7 @@ const Mo = pt(Gl), fr = (e) => {
|
|
|
4683
4683
|
id: t && t[0],
|
|
4684
4684
|
visible: h,
|
|
4685
4685
|
onSubmitSucceed: ($) => {
|
|
4686
|
-
m(!1),
|
|
4686
|
+
m(!1), U($);
|
|
4687
4687
|
},
|
|
4688
4688
|
onCancel: () => {
|
|
4689
4689
|
m(!1);
|
|
@@ -4909,23 +4909,23 @@ const bn = () => /* @__PURE__ */ i(
|
|
|
4909
4909
|
}, [t, r]);
|
|
4910
4910
|
async function K({
|
|
4911
4911
|
domain: M,
|
|
4912
|
-
isTotal:
|
|
4912
|
+
isTotal: Y
|
|
4913
4913
|
}) {
|
|
4914
|
-
if (
|
|
4914
|
+
if (Y)
|
|
4915
4915
|
return await j({ domain: M });
|
|
4916
4916
|
if (f && u) {
|
|
4917
4917
|
const z = c || await _({
|
|
4918
4918
|
params: M,
|
|
4919
4919
|
model: t,
|
|
4920
4920
|
context: o
|
|
4921
|
-
}),
|
|
4921
|
+
}), Q = await x({
|
|
4922
4922
|
model: t,
|
|
4923
4923
|
ids: z,
|
|
4924
4924
|
fieldsToRetrieve: [f],
|
|
4925
4925
|
context: o
|
|
4926
4926
|
});
|
|
4927
4927
|
return $r({
|
|
4928
|
-
values:
|
|
4928
|
+
values: Q.map((U) => U[f]),
|
|
4929
4929
|
operator: u
|
|
4930
4930
|
});
|
|
4931
4931
|
} else
|
|
@@ -4937,18 +4937,18 @@ const bn = () => /* @__PURE__ */ i(
|
|
|
4937
4937
|
}
|
|
4938
4938
|
async function j({ domain: M }) {
|
|
4939
4939
|
if (f && u) {
|
|
4940
|
-
const
|
|
4940
|
+
const Y = await _({
|
|
4941
4941
|
params: M,
|
|
4942
4942
|
model: t,
|
|
4943
4943
|
context: o
|
|
4944
4944
|
}), z = await x({
|
|
4945
4945
|
model: t,
|
|
4946
|
-
ids:
|
|
4946
|
+
ids: Y,
|
|
4947
4947
|
fieldsToRetrieve: [f],
|
|
4948
4948
|
context: o
|
|
4949
4949
|
});
|
|
4950
4950
|
return $r({
|
|
4951
|
-
values: z.map((
|
|
4951
|
+
values: z.map((Q) => Q[f]),
|
|
4952
4952
|
operator: u
|
|
4953
4953
|
});
|
|
4954
4954
|
} else
|
|
@@ -4960,36 +4960,36 @@ const bn = () => /* @__PURE__ */ i(
|
|
|
4960
4960
|
}
|
|
4961
4961
|
async function W() {
|
|
4962
4962
|
h(!0), S(void 0);
|
|
4963
|
-
let M,
|
|
4963
|
+
let M, Y;
|
|
4964
4964
|
try {
|
|
4965
4965
|
const z = await K({ domain: n, isTotal: !1 });
|
|
4966
4966
|
if (g(z), s) {
|
|
4967
|
-
const
|
|
4967
|
+
const Q = await A({
|
|
4968
4968
|
domain: s,
|
|
4969
4969
|
values: {},
|
|
4970
4970
|
context: o
|
|
4971
4971
|
});
|
|
4972
4972
|
M = await K({
|
|
4973
|
-
domain:
|
|
4973
|
+
domain: Q,
|
|
4974
4974
|
isTotal: !0
|
|
4975
4975
|
}), T(M);
|
|
4976
4976
|
}
|
|
4977
|
-
if (M ? (
|
|
4978
|
-
const
|
|
4977
|
+
if (M ? (Y = Math.round(z / M * 100 * 100) / 100, w(Y)) : w(0), r) {
|
|
4978
|
+
const Q = await N({
|
|
4979
4979
|
condition: r,
|
|
4980
|
-
values: { value: z, percent:
|
|
4980
|
+
values: { value: z, percent: Y },
|
|
4981
4981
|
context: o
|
|
4982
4982
|
});
|
|
4983
|
-
C(
|
|
4983
|
+
C(Q);
|
|
4984
4984
|
}
|
|
4985
4985
|
if (l)
|
|
4986
4986
|
if (l.indexOf(":") !== -1) {
|
|
4987
|
-
const
|
|
4987
|
+
const Q = await N({
|
|
4988
4988
|
condition: l,
|
|
4989
|
-
values: { value: z, percent:
|
|
4989
|
+
values: { value: z, percent: Y },
|
|
4990
4990
|
context: o
|
|
4991
4991
|
});
|
|
4992
|
-
V(
|
|
4992
|
+
V(Q);
|
|
4993
4993
|
} else
|
|
4994
4994
|
V(l);
|
|
4995
4995
|
S(void 0);
|
|
@@ -5023,7 +5023,7 @@ const bn = () => /* @__PURE__ */ i(
|
|
|
5023
5023
|
k.getHandler().getFields
|
|
5024
5024
|
), [T] = Xe(
|
|
5025
5025
|
k.getHandler().readObjects
|
|
5026
|
-
), [F] = Xe(k.getHandler().search), C =
|
|
5026
|
+
), [F] = Xe(k.getHandler().search), C = J(async () => {
|
|
5027
5027
|
f(!0), c(void 0);
|
|
5028
5028
|
const O = zn(r);
|
|
5029
5029
|
w(O.type || "line");
|
|
@@ -5321,7 +5321,7 @@ const dc = {
|
|
|
5321
5321
|
}, [t, e]), l = Ie(() => {
|
|
5322
5322
|
if (e === "pie")
|
|
5323
5323
|
return uc(t);
|
|
5324
|
-
}, [t, e]), d =
|
|
5324
|
+
}, [t, e]), d = J(
|
|
5325
5325
|
(p) => {
|
|
5326
5326
|
if (!l)
|
|
5327
5327
|
return;
|
|
@@ -5334,7 +5334,7 @@ const dc = {
|
|
|
5334
5334
|
return {
|
|
5335
5335
|
formatter: (p, h) => d(h.id)
|
|
5336
5336
|
};
|
|
5337
|
-
}, [l]), u =
|
|
5337
|
+
}, [l]), u = J(
|
|
5338
5338
|
({ percent: p, x: h }) => p < 0.07 ? "" : d(h),
|
|
5339
5339
|
[l]
|
|
5340
5340
|
), c = fc[e];
|
|
@@ -5696,8 +5696,8 @@ const bc = (e) => {
|
|
|
5696
5696
|
var Pe;
|
|
5697
5697
|
const { value: t, onChange: n, ooui: o, views: r } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: f } = te(
|
|
5698
5698
|
Kt
|
|
5699
|
-
), u = te($e), { activeId: c, getFields: p, getValues: h, getContext: m, domain: g } = u || {}, { t: y } = he(), [w, v] = b(!1), [T, F] = b(!1), [C, O] = b(), [V, I] = b(!1), [S, _] = b(!1), [x, R] = b(), [A, N] = b([]), [K, j] = b(!1), W = re([]), [M,
|
|
5700
|
-
readOnly:
|
|
5699
|
+
), u = te($e), { activeId: c, getFields: p, getValues: h, getContext: m, domain: g } = u || {}, { t: y } = he(), [w, v] = b(!1), [T, F] = b(!1), [C, O] = b(), [V, I] = b(!1), [S, _] = b(!1), [x, R] = b(), [A, N] = b([]), [K, j] = b(!1), W = re([]), [M, Y] = b(), z = re(), [Q, U] = b(void 0), {
|
|
5700
|
+
readOnly: H,
|
|
5701
5701
|
relation: E,
|
|
5702
5702
|
context: L,
|
|
5703
5703
|
domain: $
|
|
@@ -5706,12 +5706,12 @@ const bc = (e) => {
|
|
|
5706
5706
|
), ve = re();
|
|
5707
5707
|
fe(() => {
|
|
5708
5708
|
if (ve.current !== a) {
|
|
5709
|
-
ve.current = a,
|
|
5709
|
+
ve.current = a, X();
|
|
5710
5710
|
return;
|
|
5711
5711
|
}
|
|
5712
|
-
|
|
5712
|
+
X();
|
|
5713
5713
|
}, [s, a]);
|
|
5714
|
-
const
|
|
5714
|
+
const X = J(() => {
|
|
5715
5715
|
(a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && xe();
|
|
5716
5716
|
}, [s, a]);
|
|
5717
5717
|
fe(() => {
|
|
@@ -5742,7 +5742,7 @@ const bc = (e) => {
|
|
|
5742
5742
|
context: { ...m == null ? void 0 : m(), ...L },
|
|
5743
5743
|
currentView: q || a
|
|
5744
5744
|
});
|
|
5745
|
-
return z.current || (z.current = Oe.map((tt) => tt.id)), (a || q) === "tree" && Ae &&
|
|
5745
|
+
return z.current || (z.current = Oe.map((tt) => tt.id)), (a || q) === "tree" && Ae && U(Ae), ae(Oe), Oe;
|
|
5746
5746
|
} catch (Oe) {
|
|
5747
5747
|
O(Oe);
|
|
5748
5748
|
} finally {
|
|
@@ -5809,7 +5809,7 @@ const bc = (e) => {
|
|
|
5809
5809
|
Wo({
|
|
5810
5810
|
t: y,
|
|
5811
5811
|
onOk: async () => {
|
|
5812
|
-
a === "form" ?
|
|
5812
|
+
a === "form" ? G() : Se();
|
|
5813
5813
|
}
|
|
5814
5814
|
});
|
|
5815
5815
|
return;
|
|
@@ -5817,7 +5817,7 @@ const bc = (e) => {
|
|
|
5817
5817
|
Ko({
|
|
5818
5818
|
t: y,
|
|
5819
5819
|
onOk: async () => {
|
|
5820
|
-
a === "form" ?
|
|
5820
|
+
a === "form" ? G() : Se();
|
|
5821
5821
|
}
|
|
5822
5822
|
});
|
|
5823
5823
|
}, Me = async () => {
|
|
@@ -5830,7 +5830,7 @@ const bc = (e) => {
|
|
|
5830
5830
|
a === "form" ? le(() => {
|
|
5831
5831
|
_(!0);
|
|
5832
5832
|
}) : _(!0);
|
|
5833
|
-
},
|
|
5833
|
+
}, G = async () => {
|
|
5834
5834
|
F(!0), v(!1), O(void 0);
|
|
5835
5835
|
try {
|
|
5836
5836
|
if (oe[d].id > 0) {
|
|
@@ -5952,7 +5952,7 @@ const bc = (e) => {
|
|
|
5952
5952
|
} : at);
|
|
5953
5953
|
ae(Ye), v(!0);
|
|
5954
5954
|
},
|
|
5955
|
-
readOnly:
|
|
5955
|
+
readOnly: H
|
|
5956
5956
|
}
|
|
5957
5957
|
);
|
|
5958
5958
|
let q = [];
|
|
@@ -5977,10 +5977,10 @@ const bc = (e) => {
|
|
|
5977
5977
|
selectedRowKeys: A,
|
|
5978
5978
|
onRowSelectionChange: N,
|
|
5979
5979
|
sorter: M,
|
|
5980
|
-
onChangeSort:
|
|
5980
|
+
onChangeSort: Y,
|
|
5981
5981
|
context: { ...m == null ? void 0 : m(), ...L },
|
|
5982
|
-
colorsForResults:
|
|
5983
|
-
readonly:
|
|
5982
|
+
colorsForResults: Q,
|
|
5983
|
+
readonly: H,
|
|
5984
5984
|
scrollY: o == null ? void 0 : o.height
|
|
5985
5985
|
}
|
|
5986
5986
|
);
|
|
@@ -6007,7 +6007,7 @@ const bc = (e) => {
|
|
|
6007
6007
|
{
|
|
6008
6008
|
mode: a,
|
|
6009
6009
|
title: pe(),
|
|
6010
|
-
readOnly:
|
|
6010
|
+
readOnly: H || !1,
|
|
6011
6011
|
isMany2Many: de,
|
|
6012
6012
|
formHasChanges: w,
|
|
6013
6013
|
totalItems: oe.length,
|
|
@@ -6039,7 +6039,7 @@ const bc = (e) => {
|
|
|
6039
6039
|
onCancel: () => {
|
|
6040
6040
|
j(!1), I(!1);
|
|
6041
6041
|
},
|
|
6042
|
-
readOnly:
|
|
6042
|
+
readOnly: H,
|
|
6043
6043
|
mustClearAfterSave: We
|
|
6044
6044
|
}
|
|
6045
6045
|
),
|
|
@@ -6094,15 +6094,15 @@ const bc = (e) => {
|
|
|
6094
6094
|
relation: t,
|
|
6095
6095
|
context: n
|
|
6096
6096
|
}) => {
|
|
6097
|
-
const [o, r] = b([]), s = re(0), a = re(o), l = re(!1), d =
|
|
6097
|
+
const [o, r] = b([]), s = re(0), a = re(o), l = re(!1), d = J((m) => {
|
|
6098
6098
|
l.current = m;
|
|
6099
|
-
}, []), f =
|
|
6099
|
+
}, []), f = J((m) => {
|
|
6100
6100
|
s.current = m;
|
|
6101
|
-
}, []), u =
|
|
6101
|
+
}, []), u = J(() => s.current, []);
|
|
6102
6102
|
fe(() => {
|
|
6103
6103
|
a.current = o;
|
|
6104
6104
|
}, [o]);
|
|
6105
|
-
const c =
|
|
6105
|
+
const c = J(() => l ? [] : a.current, []), p = Ie(() => Tt(e), [e]);
|
|
6106
6106
|
return {
|
|
6107
6107
|
onTreeFetchRows: It(
|
|
6108
6108
|
async (m) => {
|
|
@@ -6142,7 +6142,7 @@ const bc = (e) => {
|
|
|
6142
6142
|
const m = e[d];
|
|
6143
6143
|
(!m || (m == null ? void 0 : m.operation) === "original") && l(!1);
|
|
6144
6144
|
}, [d, e]);
|
|
6145
|
-
const u =
|
|
6145
|
+
const u = J(
|
|
6146
6146
|
async ({ id: m }) => {
|
|
6147
6147
|
const g = (await k.getHandler().readObjects({
|
|
6148
6148
|
model: t,
|
|
@@ -6163,12 +6163,12 @@ const bc = (e) => {
|
|
|
6163
6163
|
} : v);
|
|
6164
6164
|
},
|
|
6165
6165
|
[n, r.fields, e, t, o.fields]
|
|
6166
|
-
), c =
|
|
6166
|
+
), c = J(
|
|
6167
6167
|
(m) => {
|
|
6168
6168
|
l(!0), s(m);
|
|
6169
6169
|
},
|
|
6170
6170
|
[l, s]
|
|
6171
|
-
), p =
|
|
6171
|
+
), p = J(async () => {
|
|
6172
6172
|
const { id: m } = e[d];
|
|
6173
6173
|
if (!m)
|
|
6174
6174
|
return;
|
|
@@ -6176,7 +6176,7 @@ const bc = (e) => {
|
|
|
6176
6176
|
s(g);
|
|
6177
6177
|
}, [u, d, e, s]);
|
|
6178
6178
|
return {
|
|
6179
|
-
showFormChangesDialogIfNeeded:
|
|
6179
|
+
showFormChangesDialogIfNeeded: J(
|
|
6180
6180
|
(m) => {
|
|
6181
6181
|
a ? $t({
|
|
6182
6182
|
t: f,
|
|
@@ -6236,7 +6236,7 @@ const bc = (e) => {
|
|
|
6236
6236
|
}) => {
|
|
6237
6237
|
const { t: a } = he(), { currentView: l, itemIndex: d, setItemIndex: f } = te(
|
|
6238
6238
|
Kt
|
|
6239
|
-
), u =
|
|
6239
|
+
), u = J(async () => {
|
|
6240
6240
|
const m = Oc({
|
|
6241
6241
|
selectedRowKeys: r,
|
|
6242
6242
|
items: n
|
|
@@ -6259,7 +6259,7 @@ const bc = (e) => {
|
|
|
6259
6259
|
f,
|
|
6260
6260
|
s,
|
|
6261
6261
|
t
|
|
6262
|
-
]), c =
|
|
6262
|
+
]), c = J(async () => {
|
|
6263
6263
|
o(!1);
|
|
6264
6264
|
try {
|
|
6265
6265
|
if (n[d].id > 0) {
|
|
@@ -6274,8 +6274,8 @@ const bc = (e) => {
|
|
|
6274
6274
|
$n(m);
|
|
6275
6275
|
}
|
|
6276
6276
|
f(0);
|
|
6277
|
-
}, [n, d, o, f, t]), p =
|
|
6278
|
-
return { showRemoveConfirm:
|
|
6277
|
+
}, [n, d, o, f, t]), p = J(async () => l === "form" ? await c() : await u(), [l, c, u]);
|
|
6278
|
+
return { showRemoveConfirm: J(() => {
|
|
6279
6279
|
if (e) {
|
|
6280
6280
|
Wo({
|
|
6281
6281
|
t: a,
|
|
@@ -6311,12 +6311,12 @@ const Rc = ({
|
|
|
6311
6311
|
formView: f,
|
|
6312
6312
|
context: u
|
|
6313
6313
|
}) => {
|
|
6314
|
-
const [c, p] = b(!1), [h, m] = b(), [g, y] = b(!1), w =
|
|
6314
|
+
const [c, p] = b(!1), [h, m] = b(), [g, y] = b(!1), w = J(async () => {
|
|
6315
6315
|
let C;
|
|
6316
6316
|
t && n && (C = { [t]: n }), e === "form" ? o(() => {
|
|
6317
6317
|
y(!0), m({ defaultValues: C }), p(!0);
|
|
6318
6318
|
}) : (y(!0), m({ defaultValues: C }), p(!0));
|
|
6319
|
-
}, [n, e, t, o]), v =
|
|
6319
|
+
}, [n, e, t, o]), v = J(() => {
|
|
6320
6320
|
p(!1), y(!1);
|
|
6321
6321
|
}, []), T = It(
|
|
6322
6322
|
(C, O, V, I = !1) => {
|
|
@@ -6383,7 +6383,7 @@ const Rc = ({
|
|
|
6383
6383
|
e === "form" ? t(() => {
|
|
6384
6384
|
d(!0);
|
|
6385
6385
|
}) : d(!0);
|
|
6386
|
-
}, u =
|
|
6386
|
+
}, u = J(() => {
|
|
6387
6387
|
d(!1);
|
|
6388
6388
|
}, []), c = It(
|
|
6389
6389
|
async (h) => {
|
|
@@ -6414,7 +6414,7 @@ const Rc = ({
|
|
|
6414
6414
|
}
|
|
6415
6415
|
},
|
|
6416
6416
|
[r, n, a, o, s]
|
|
6417
|
-
), p =
|
|
6417
|
+
), p = J(
|
|
6418
6418
|
async (h) => {
|
|
6419
6419
|
d(!1), c(h);
|
|
6420
6420
|
},
|
|
@@ -6470,23 +6470,23 @@ const Rc = ({
|
|
|
6470
6470
|
...Do
|
|
6471
6471
|
},
|
|
6472
6472
|
s
|
|
6473
|
-
), [s, r]), V =
|
|
6473
|
+
), [s, r]), V = J(
|
|
6474
6474
|
async (x, R) => {
|
|
6475
|
-
const A = F.current, K = A.map((
|
|
6476
|
-
const
|
|
6477
|
-
return
|
|
6478
|
-
});
|
|
6479
|
-
if (j.length === 0)
|
|
6475
|
+
const A = F.current, K = A.map((U) => U.id).slice(x, R), j = K.filter((U) => {
|
|
6476
|
+
const H = A.find((E) => E.id === U);
|
|
6477
|
+
return H && (H.operation === "original" || H.operation === "pendingLink");
|
|
6478
|
+
}), W = A.filter((U) => U && U.operation !== "original" && U.operation !== "pendingLink");
|
|
6479
|
+
if (j.length === 0 && W.length === 0)
|
|
6480
6480
|
return [];
|
|
6481
|
-
const { results:
|
|
6482
|
-
var
|
|
6483
|
-
const
|
|
6484
|
-
return
|
|
6481
|
+
const { results: M, colors: Y } = await a(j), z = lr(r, M), Q = K.map((U) => {
|
|
6482
|
+
var E;
|
|
6483
|
+
const H = z.find((L) => L.id === U);
|
|
6484
|
+
return H || ((E = A.find((L) => L.id === U)) == null ? void 0 : E.treeValues);
|
|
6485
6485
|
});
|
|
6486
|
-
return v.current = { ...v.current, ...
|
|
6486
|
+
return v.current = { ...v.current, ...Y }, Q;
|
|
6487
6487
|
},
|
|
6488
6488
|
[a, r]
|
|
6489
|
-
), I =
|
|
6489
|
+
), I = J((x) => {
|
|
6490
6490
|
var R, A, N, K;
|
|
6491
6491
|
if (v.current[(A = (R = x.node) == null ? void 0 : R.data) == null ? void 0 : A.id])
|
|
6492
6492
|
return { color: v.current[(K = (N = x.node) == null ? void 0 : N.data) == null ? void 0 : K.id] };
|
|
@@ -6545,7 +6545,7 @@ const Rc = ({
|
|
|
6545
6545
|
}), W = Ie(() => {
|
|
6546
6546
|
const { title: me } = s.get(d) || {};
|
|
6547
6547
|
return me || r.label;
|
|
6548
|
-
}, [d, r.label, s]), M = r.type === "many2many",
|
|
6548
|
+
}, [d, r.label, s]), M = r.type === "many2many", Y = J(
|
|
6549
6549
|
(me) => {
|
|
6550
6550
|
var Me, He;
|
|
6551
6551
|
o == null || o({
|
|
@@ -6556,16 +6556,16 @@ const Rc = ({
|
|
|
6556
6556
|
[o, s]
|
|
6557
6557
|
), {
|
|
6558
6558
|
formHasChanges: z,
|
|
6559
|
-
onFormChanges:
|
|
6560
|
-
showFormChangesDialogIfNeeded:
|
|
6561
|
-
setFormHasChanges:
|
|
6559
|
+
onFormChanges: Q,
|
|
6560
|
+
showFormChangesDialogIfNeeded: U,
|
|
6561
|
+
setFormHasChanges: H
|
|
6562
6562
|
} = Sc({
|
|
6563
6563
|
items: l,
|
|
6564
6564
|
formView: s.get("form"),
|
|
6565
6565
|
treeView: s.get("tree"),
|
|
6566
6566
|
relation: h,
|
|
6567
6567
|
context: O,
|
|
6568
|
-
triggerChange:
|
|
6568
|
+
triggerChange: Y
|
|
6569
6569
|
}), {
|
|
6570
6570
|
showFormModal: E,
|
|
6571
6571
|
modalItem: L,
|
|
@@ -6577,9 +6577,9 @@ const Rc = ({
|
|
|
6577
6577
|
} = Rc({
|
|
6578
6578
|
activeId: v,
|
|
6579
6579
|
inv_field: r.inv_field,
|
|
6580
|
-
showFormChangesDialogIfNeeded:
|
|
6580
|
+
showFormChangesDialogIfNeeded: U,
|
|
6581
6581
|
currentView: d,
|
|
6582
|
-
triggerChange:
|
|
6582
|
+
triggerChange: Y,
|
|
6583
6583
|
items: l,
|
|
6584
6584
|
setCurrentView: f,
|
|
6585
6585
|
setItemIndex: c,
|
|
@@ -6587,14 +6587,14 @@ const Rc = ({
|
|
|
6587
6587
|
relation: h,
|
|
6588
6588
|
formView: s.get("form")
|
|
6589
6589
|
}), {
|
|
6590
|
-
showSearchModal:
|
|
6590
|
+
showSearchModal: X,
|
|
6591
6591
|
onSelectSearchValues: ae,
|
|
6592
6592
|
onCloseSearchModal: xe,
|
|
6593
6593
|
searchItem: De
|
|
6594
6594
|
} = Vc({
|
|
6595
|
-
showFormChangesDialogIfNeeded:
|
|
6595
|
+
showFormChangesDialogIfNeeded: U,
|
|
6596
6596
|
currentView: d,
|
|
6597
|
-
triggerChange:
|
|
6597
|
+
triggerChange: Y,
|
|
6598
6598
|
items: l,
|
|
6599
6599
|
views: s,
|
|
6600
6600
|
context: O,
|
|
@@ -6602,13 +6602,13 @@ const Rc = ({
|
|
|
6602
6602
|
}), { showRemoveConfirm: Ee } = Fc({
|
|
6603
6603
|
isMany2many: M,
|
|
6604
6604
|
items: l,
|
|
6605
|
-
triggerChange:
|
|
6606
|
-
setFormHasChanges:
|
|
6605
|
+
triggerChange: Y,
|
|
6606
|
+
setFormHasChanges: H,
|
|
6607
6607
|
selectedRowKeys: _,
|
|
6608
6608
|
setSelectedRowKeys: x
|
|
6609
6609
|
}), ke = () => {
|
|
6610
6610
|
const me = Array.from(s.keys()), Me = me[(me.indexOf(d) + 1) % me.length];
|
|
6611
|
-
d === "form" ?
|
|
6611
|
+
d === "form" ? U(() => {
|
|
6612
6612
|
f(Me);
|
|
6613
6613
|
}) : f(Me);
|
|
6614
6614
|
}, ue = It(
|
|
@@ -6618,13 +6618,13 @@ const Rc = ({
|
|
|
6618
6618
|
},
|
|
6619
6619
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6620
6620
|
[l]
|
|
6621
|
-
), Fe =
|
|
6622
|
-
u > 0 && (d === "form" ?
|
|
6621
|
+
), Fe = J(() => {
|
|
6622
|
+
u > 0 && (d === "form" ? U(() => {
|
|
6623
6623
|
c(u - 1);
|
|
6624
6624
|
}) : c(u - 1));
|
|
6625
|
-
}, [d, u, c,
|
|
6625
|
+
}, [d, u, c, U]), Le = J(() => {
|
|
6626
6626
|
const me = l.length;
|
|
6627
|
-
u < me - 1 && (d === "form" ?
|
|
6627
|
+
u < me - 1 && (d === "form" ? U(() => {
|
|
6628
6628
|
c(u + 1);
|
|
6629
6629
|
}) : c(u + 1));
|
|
6630
6630
|
}, [
|
|
@@ -6632,7 +6632,7 @@ const Rc = ({
|
|
|
6632
6632
|
u,
|
|
6633
6633
|
l.length,
|
|
6634
6634
|
c,
|
|
6635
|
-
|
|
6635
|
+
U
|
|
6636
6636
|
]);
|
|
6637
6637
|
return /* @__PURE__ */ D(ie, { children: [
|
|
6638
6638
|
/* @__PURE__ */ i(
|
|
@@ -6688,7 +6688,7 @@ const Rc = ({
|
|
|
6688
6688
|
context: O,
|
|
6689
6689
|
relation: h,
|
|
6690
6690
|
readOnly: p || !1,
|
|
6691
|
-
onChange:
|
|
6691
|
+
onChange: Q
|
|
6692
6692
|
}
|
|
6693
6693
|
),
|
|
6694
6694
|
/* @__PURE__ */ i(
|
|
@@ -6714,7 +6714,7 @@ const Rc = ({
|
|
|
6714
6714
|
domain: V,
|
|
6715
6715
|
model: h,
|
|
6716
6716
|
context: O,
|
|
6717
|
-
visible:
|
|
6717
|
+
visible: X,
|
|
6718
6718
|
onSelectValues: ae,
|
|
6719
6719
|
onCloseModal: xe
|
|
6720
6720
|
}
|
|
@@ -6993,7 +6993,7 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
6993
6993
|
limit: r,
|
|
6994
6994
|
onClose: s
|
|
6995
6995
|
}) => {
|
|
6996
|
-
const a = re({}), l = re(/* @__PURE__ */ new Map()), { t: d } = he(), f =
|
|
6996
|
+
const a = re({}), l = re(/* @__PURE__ */ new Map()), { t: d } = he(), f = J(
|
|
6997
6997
|
async (y) => {
|
|
6998
6998
|
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
6999
6999
|
mt(d("selectAtLeastOneField"));
|
|
@@ -7019,14 +7019,14 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
7019
7019
|
vn(v, T.mime);
|
|
7020
7020
|
},
|
|
7021
7021
|
[o, n, e, r, t, s, d]
|
|
7022
|
-
), u =
|
|
7022
|
+
), u = J(async () => {
|
|
7023
7023
|
const y = await k.getHandler().getFields({
|
|
7024
7024
|
model: e,
|
|
7025
7025
|
context: t,
|
|
7026
7026
|
fields: []
|
|
7027
7027
|
});
|
|
7028
7028
|
return a.current["/"] = y, Kr({ fields: y });
|
|
7029
|
-
}, [e, t, a]), c =
|
|
7029
|
+
}, [e, t, a]), c = J(
|
|
7030
7030
|
async (y) => {
|
|
7031
7031
|
const v = Kn(y, a.current)[jn(y)], T = v.relation, F = await k.getHandler().getFields({
|
|
7032
7032
|
model: T,
|
|
@@ -7044,7 +7044,7 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
7044
7044
|
});
|
|
7045
7045
|
},
|
|
7046
7046
|
[t]
|
|
7047
|
-
), p =
|
|
7047
|
+
), p = J(async () => {
|
|
7048
7048
|
const y = await qc({ model: e, context: t }), w = await Jc({
|
|
7049
7049
|
predefinedExports: y,
|
|
7050
7050
|
fields: a.current,
|
|
@@ -7065,7 +7065,7 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
7065
7065
|
})),
|
|
7066
7066
|
keysWithChilds: w
|
|
7067
7067
|
};
|
|
7068
|
-
}, [t, e, c]), h =
|
|
7068
|
+
}, [t, e, c]), h = J(
|
|
7069
7069
|
async (y) => {
|
|
7070
7070
|
await k.getHandler().deleteObjects({
|
|
7071
7071
|
model: "ir.exports",
|
|
@@ -7074,7 +7074,7 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
7074
7074
|
});
|
|
7075
7075
|
},
|
|
7076
7076
|
[t]
|
|
7077
|
-
), m =
|
|
7077
|
+
), m = J(
|
|
7078
7078
|
async (y) => {
|
|
7079
7079
|
if (l.current.has(y))
|
|
7080
7080
|
return l.current.get(y);
|
|
@@ -7086,7 +7086,7 @@ const { useToken: Bc } = Ke, { TextArea: Hn } = it, jc = (e) => {
|
|
|
7086
7086
|
l.current.set(y, w);
|
|
7087
7087
|
},
|
|
7088
7088
|
[l, t]
|
|
7089
|
-
), g =
|
|
7089
|
+
), g = J(
|
|
7090
7090
|
async (y) => {
|
|
7091
7091
|
const w = await m("ir.exports"), v = await m("ir.exports.line"), T = await k.getHandler().create({
|
|
7092
7092
|
model: "ir.exports",
|
|
@@ -7693,7 +7693,7 @@ function fd(e) {
|
|
|
7693
7693
|
onAddNewAttachment: o,
|
|
7694
7694
|
onListAllAttachments: r,
|
|
7695
7695
|
onViewAttachmentDetails: s
|
|
7696
|
-
} = e, { formRef: a } = te(nt), [l, d] = b(!1), [f, u] = b([]), [c, p] = b(!1), { t: h } = he(), m =
|
|
7696
|
+
} = e, { formRef: a } = te(nt), [l, d] = b(!1), [f, u] = b([]), [c, p] = b(!1), { t: h } = he(), m = J(async () => {
|
|
7697
7697
|
if (!(!t || t.length === 0)) {
|
|
7698
7698
|
d(!0);
|
|
7699
7699
|
try {
|
|
@@ -7716,7 +7716,7 @@ function fd(e) {
|
|
|
7716
7716
|
}
|
|
7717
7717
|
d(!1);
|
|
7718
7718
|
}
|
|
7719
|
-
}, [t, a]), g =
|
|
7719
|
+
}, [t, a]), g = J(
|
|
7720
7720
|
async (w) => {
|
|
7721
7721
|
if (w.link) {
|
|
7722
7722
|
window.open(w.link);
|
|
@@ -7741,7 +7741,7 @@ function fd(e) {
|
|
|
7741
7741
|
s(v);
|
|
7742
7742
|
},
|
|
7743
7743
|
[a, s]
|
|
7744
|
-
), y =
|
|
7744
|
+
), y = J(
|
|
7745
7745
|
async (w) => {
|
|
7746
7746
|
s(w);
|
|
7747
7747
|
},
|
|
@@ -7838,7 +7838,7 @@ function md({ toolbar: e }) {
|
|
|
7838
7838
|
function M() {
|
|
7839
7839
|
d && u > 0 ? (f == null || f(u - 1), c == null || c(d[u - 1].id)) : d && u === 0 && (f == null || f(d.length - 1), c == null || c(d[d.length - 1].id));
|
|
7840
7840
|
}
|
|
7841
|
-
function
|
|
7841
|
+
function Y() {
|
|
7842
7842
|
en({
|
|
7843
7843
|
confirmMessage: S("confirmRemoveItem"),
|
|
7844
7844
|
t: S,
|
|
@@ -7864,7 +7864,7 @@ function md({ toolbar: e }) {
|
|
|
7864
7864
|
h == null || h(!1);
|
|
7865
7865
|
}
|
|
7866
7866
|
}
|
|
7867
|
-
async function
|
|
7867
|
+
async function Q() {
|
|
7868
7868
|
try {
|
|
7869
7869
|
y == null || y(!0);
|
|
7870
7870
|
const E = await k.getHandler().duplicate({
|
|
@@ -7879,8 +7879,8 @@ function md({ toolbar: e }) {
|
|
|
7879
7879
|
y == null || y(!1);
|
|
7880
7880
|
}
|
|
7881
7881
|
}
|
|
7882
|
-
const
|
|
7883
|
-
function
|
|
7882
|
+
const U = a || m || v || g;
|
|
7883
|
+
function H(E) {
|
|
7884
7884
|
x == null || x({
|
|
7885
7885
|
actionData: E,
|
|
7886
7886
|
values: F.current.getValues(),
|
|
@@ -7908,7 +7908,7 @@ function md({ toolbar: e }) {
|
|
|
7908
7908
|
{
|
|
7909
7909
|
icon: /* @__PURE__ */ i(Wi, {}),
|
|
7910
7910
|
tooltip: S("save"),
|
|
7911
|
-
disabled: !s ||
|
|
7911
|
+
disabled: !s || U,
|
|
7912
7912
|
loading: a,
|
|
7913
7913
|
onClick: r
|
|
7914
7914
|
}
|
|
@@ -7920,7 +7920,7 @@ function md({ toolbar: e }) {
|
|
|
7920
7920
|
tooltip: S("duplicate"),
|
|
7921
7921
|
disabled: s || a || l === void 0 || g || v,
|
|
7922
7922
|
loading: g,
|
|
7923
|
-
onClick:
|
|
7923
|
+
onClick: Q
|
|
7924
7924
|
}
|
|
7925
7925
|
),
|
|
7926
7926
|
/* @__PURE__ */ i(
|
|
@@ -7930,7 +7930,7 @@ function md({ toolbar: e }) {
|
|
|
7930
7930
|
tooltip: S("delete"),
|
|
7931
7931
|
disabled: a || l === void 0 || m || g || v,
|
|
7932
7932
|
loading: m,
|
|
7933
|
-
onClick:
|
|
7933
|
+
onClick: Y
|
|
7934
7934
|
}
|
|
7935
7935
|
),
|
|
7936
7936
|
Vt(),
|
|
@@ -7970,7 +7970,7 @@ function md({ toolbar: e }) {
|
|
|
7970
7970
|
onChangeView: (E) => {
|
|
7971
7971
|
V == null || V(n), C == null || C(!1), o == null || o(E);
|
|
7972
7972
|
},
|
|
7973
|
-
disabled:
|
|
7973
|
+
disabled: U,
|
|
7974
7974
|
formHasChanges: s
|
|
7975
7975
|
}
|
|
7976
7976
|
),
|
|
@@ -7981,7 +7981,7 @@ function md({ toolbar: e }) {
|
|
|
7981
7981
|
{
|
|
7982
7982
|
icon: /* @__PURE__ */ i(io, {}),
|
|
7983
7983
|
tooltip: S("previous"),
|
|
7984
|
-
disabled:
|
|
7984
|
+
disabled: U,
|
|
7985
7985
|
loading: !1,
|
|
7986
7986
|
onClick: () => {
|
|
7987
7987
|
j(M);
|
|
@@ -7993,7 +7993,7 @@ function md({ toolbar: e }) {
|
|
|
7993
7993
|
{
|
|
7994
7994
|
icon: /* @__PURE__ */ i(so, {}),
|
|
7995
7995
|
tooltip: S("next"),
|
|
7996
|
-
disabled:
|
|
7996
|
+
disabled: U,
|
|
7997
7997
|
loading: !1,
|
|
7998
7998
|
onClick: () => {
|
|
7999
7999
|
j(W);
|
|
@@ -8007,14 +8007,14 @@ function md({ toolbar: e }) {
|
|
|
8007
8007
|
{
|
|
8008
8008
|
icon: /* @__PURE__ */ i(er, {}),
|
|
8009
8009
|
placement: "bottomRight",
|
|
8010
|
-
disabled:
|
|
8010
|
+
disabled: U,
|
|
8011
8011
|
onRetrieveData: async () => [
|
|
8012
8012
|
{ label: S("actions"), items: e == null ? void 0 : e.action }
|
|
8013
8013
|
],
|
|
8014
8014
|
onItemClick: async (E) => {
|
|
8015
8015
|
!E || !(await _t({
|
|
8016
8016
|
onFormSave: r
|
|
8017
|
-
})).succeed ||
|
|
8017
|
+
})).succeed || H(E);
|
|
8018
8018
|
}
|
|
8019
8019
|
}
|
|
8020
8020
|
),
|
|
@@ -8022,7 +8022,7 @@ function md({ toolbar: e }) {
|
|
|
8022
8022
|
Et,
|
|
8023
8023
|
{
|
|
8024
8024
|
icon: /* @__PURE__ */ i(tr, {}),
|
|
8025
|
-
disabled:
|
|
8025
|
+
disabled: U,
|
|
8026
8026
|
placement: "bottomRight",
|
|
8027
8027
|
onRetrieveData: async () => [
|
|
8028
8028
|
{ label: S("reports"), items: e == null ? void 0 : e.print }
|
|
@@ -8033,7 +8033,7 @@ function md({ toolbar: e }) {
|
|
|
8033
8033
|
const L = await _t({
|
|
8034
8034
|
onFormSave: r
|
|
8035
8035
|
});
|
|
8036
|
-
L.succeed &&
|
|
8036
|
+
L.succeed && H({
|
|
8037
8037
|
...E,
|
|
8038
8038
|
datas: {
|
|
8039
8039
|
...E.datas || {},
|
|
@@ -8047,7 +8047,7 @@ function md({ toolbar: e }) {
|
|
|
8047
8047
|
Et,
|
|
8048
8048
|
{
|
|
8049
8049
|
icon: /* @__PURE__ */ i(nr, {}),
|
|
8050
|
-
disabled:
|
|
8050
|
+
disabled: U,
|
|
8051
8051
|
placement: "bottomRight",
|
|
8052
8052
|
onRetrieveData: async () => [
|
|
8053
8053
|
{ label: S("related"), items: e == null ? void 0 : e.relate }
|
|
@@ -8068,7 +8068,7 @@ function md({ toolbar: e }) {
|
|
|
8068
8068
|
/* @__PURE__ */ i(
|
|
8069
8069
|
fd,
|
|
8070
8070
|
{
|
|
8071
|
-
disabled:
|
|
8071
|
+
disabled: U,
|
|
8072
8072
|
attachments: T,
|
|
8073
8073
|
onAddNewAttachment: async () => {
|
|
8074
8074
|
const E = await _t({
|
|
@@ -8509,7 +8509,7 @@ const xd = (e) => {
|
|
|
8509
8509
|
}, [S]), fe(() => {
|
|
8510
8510
|
t.view_id !== R.view_id && N(!0);
|
|
8511
8511
|
}, [R]);
|
|
8512
|
-
const { clear: K, searchFilterLoading: j, searchError: W, offset: M, tableRefreshing:
|
|
8512
|
+
const { clear: K, searchFilterLoading: j, searchError: W, offset: M, tableRefreshing: Y } = ko({
|
|
8513
8513
|
model: o,
|
|
8514
8514
|
setSearchTreeNameSearch: C,
|
|
8515
8515
|
setSelectedRowItems: m,
|
|
@@ -8562,7 +8562,7 @@ const xd = (e) => {
|
|
|
8562
8562
|
showLimitOptions: !1
|
|
8563
8563
|
}
|
|
8564
8564
|
),
|
|
8565
|
-
|
|
8565
|
+
Y ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(
|
|
8566
8566
|
nn,
|
|
8567
8567
|
{
|
|
8568
8568
|
ref: d,
|
|
@@ -8986,7 +8986,7 @@ _d.displayName = "ConfigContextProvider";
|
|
|
8986
8986
|
var xn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e))(xn || {});
|
|
8987
8987
|
const wf = Object.values(xn);
|
|
8988
8988
|
function Ad(e) {
|
|
8989
|
-
var
|
|
8989
|
+
var U;
|
|
8990
8990
|
const {
|
|
8991
8991
|
availableViews: t,
|
|
8992
8992
|
currentView: n,
|
|
@@ -9021,18 +9021,18 @@ function Ad(e) {
|
|
|
9021
9021
|
confirmMessage: R("confirmRemove"),
|
|
9022
9022
|
t: R,
|
|
9023
9023
|
onOk: () => {
|
|
9024
|
-
|
|
9024
|
+
Y();
|
|
9025
9025
|
}
|
|
9026
9026
|
});
|
|
9027
9027
|
}
|
|
9028
|
-
async function
|
|
9029
|
-
var
|
|
9028
|
+
async function Y() {
|
|
9029
|
+
var H;
|
|
9030
9030
|
try {
|
|
9031
9031
|
s == null || s(!0), await k.getHandler().deleteObjects({
|
|
9032
9032
|
model: f,
|
|
9033
9033
|
ids: r.map((E) => E.id),
|
|
9034
9034
|
context: { ...I }
|
|
9035
|
-
}), c == null || c(void 0), p == null || p(void 0), (
|
|
9035
|
+
}), c == null || c(void 0), p == null || p(void 0), (H = u == null ? void 0 : u.current) == null || H.refreshResults();
|
|
9036
9036
|
} catch (E) {
|
|
9037
9037
|
Qe(E);
|
|
9038
9038
|
} finally {
|
|
@@ -9040,7 +9040,7 @@ function Ad(e) {
|
|
|
9040
9040
|
}
|
|
9041
9041
|
}
|
|
9042
9042
|
async function z() {
|
|
9043
|
-
var
|
|
9043
|
+
var H;
|
|
9044
9044
|
try {
|
|
9045
9045
|
d == null || d(!0);
|
|
9046
9046
|
const E = r[0].id;
|
|
@@ -9048,16 +9048,16 @@ function Ad(e) {
|
|
|
9048
9048
|
id: E,
|
|
9049
9049
|
model: f,
|
|
9050
9050
|
context: { ...I }
|
|
9051
|
-
}) && ((
|
|
9051
|
+
}) && ((H = u == null ? void 0 : u.current) == null || H.refreshResults());
|
|
9052
9052
|
} catch (E) {
|
|
9053
9053
|
Qe(E);
|
|
9054
9054
|
} finally {
|
|
9055
9055
|
d == null || d(!1);
|
|
9056
9056
|
}
|
|
9057
9057
|
}
|
|
9058
|
-
function
|
|
9058
|
+
function Q(H) {
|
|
9059
9059
|
N == null || N({
|
|
9060
|
-
actionData:
|
|
9060
|
+
actionData: H,
|
|
9061
9061
|
values: {
|
|
9062
9062
|
active_id: r == null ? void 0 : r.map((E) => E.id)[0],
|
|
9063
9063
|
active_ids: r == null ? void 0 : r.map((E) => E.id)
|
|
@@ -9086,8 +9086,8 @@ function Ad(e) {
|
|
|
9086
9086
|
{
|
|
9087
9087
|
disabled: l || a || v,
|
|
9088
9088
|
searchText: w,
|
|
9089
|
-
onSearch: (
|
|
9090
|
-
|
|
9089
|
+
onSearch: (H) => {
|
|
9090
|
+
H && H.trim().length > 0 ? y == null || y(H) : y == null || y(void 0);
|
|
9091
9091
|
}
|
|
9092
9092
|
}
|
|
9093
9093
|
),
|
|
@@ -9153,8 +9153,8 @@ function Ad(e) {
|
|
|
9153
9153
|
disabled: l || a || v,
|
|
9154
9154
|
loading: !1,
|
|
9155
9155
|
onClick: () => {
|
|
9156
|
-
var
|
|
9157
|
-
(
|
|
9156
|
+
var H;
|
|
9157
|
+
(H = u == null ? void 0 : u.current) == null || H.refreshResults();
|
|
9158
9158
|
}
|
|
9159
9159
|
}
|
|
9160
9160
|
),
|
|
@@ -9165,8 +9165,8 @@ function Ad(e) {
|
|
|
9165
9165
|
{
|
|
9166
9166
|
currentView: n,
|
|
9167
9167
|
availableViews: t,
|
|
9168
|
-
onChangeView: (
|
|
9169
|
-
T == null || T(n), o == null || o(
|
|
9168
|
+
onChangeView: (H) => {
|
|
9169
|
+
T == null || T(n), o == null || o(H);
|
|
9170
9170
|
},
|
|
9171
9171
|
previousView: F,
|
|
9172
9172
|
disabled: v
|
|
@@ -9183,8 +9183,8 @@ function Ad(e) {
|
|
|
9183
9183
|
onRetrieveData: async () => [
|
|
9184
9184
|
{ label: R("actions"), items: _ == null ? void 0 : _.action }
|
|
9185
9185
|
],
|
|
9186
|
-
onItemClick: (
|
|
9187
|
-
|
|
9186
|
+
onItemClick: (H) => {
|
|
9187
|
+
H && Q(H);
|
|
9188
9188
|
}
|
|
9189
9189
|
}
|
|
9190
9190
|
),
|
|
@@ -9197,11 +9197,11 @@ function Ad(e) {
|
|
|
9197
9197
|
onRetrieveData: async () => [
|
|
9198
9198
|
{ label: R("reports"), items: _ == null ? void 0 : _.print }
|
|
9199
9199
|
],
|
|
9200
|
-
onItemClick: (
|
|
9201
|
-
|
|
9202
|
-
...
|
|
9200
|
+
onItemClick: (H) => {
|
|
9201
|
+
H && Q({
|
|
9202
|
+
...H,
|
|
9203
9203
|
datas: {
|
|
9204
|
-
...
|
|
9204
|
+
...H.datas || {},
|
|
9205
9205
|
ids: r.map((E) => E.id)
|
|
9206
9206
|
}
|
|
9207
9207
|
});
|
|
@@ -9255,10 +9255,10 @@ function Ad(e) {
|
|
|
9255
9255
|
]
|
|
9256
9256
|
}
|
|
9257
9257
|
],
|
|
9258
|
-
onItemClick: (
|
|
9259
|
-
if (
|
|
9258
|
+
onItemClick: (H) => {
|
|
9259
|
+
if (H.id === "print_screen") {
|
|
9260
9260
|
let E = (r == null ? void 0 : r.map((L) => L.id)) || [];
|
|
9261
|
-
E.length === 0 && (E = (C == null ? void 0 : C.map((L) => L.id)) || []),
|
|
9261
|
+
E.length === 0 && (E = (C == null ? void 0 : C.map((L) => L.id)) || []), Q({
|
|
9262
9262
|
id: -1,
|
|
9263
9263
|
model: f,
|
|
9264
9264
|
report_name: "printscreen.list",
|
|
@@ -9282,7 +9282,7 @@ function Ad(e) {
|
|
|
9282
9282
|
onClose: () => j(!1),
|
|
9283
9283
|
model: f,
|
|
9284
9284
|
domain: Xt(
|
|
9285
|
-
((
|
|
9285
|
+
((U = u == null ? void 0 : u.current) == null ? void 0 : U.getDomain()) || [],
|
|
9286
9286
|
h || []
|
|
9287
9287
|
),
|
|
9288
9288
|
limit: O,
|
|
@@ -9478,11 +9478,11 @@ function Ld(e, t) {
|
|
|
9478
9478
|
limit: y
|
|
9479
9479
|
} = e, [w, v] = b(), [T, F] = b([]), [C, O] = b(!0), V = p || void 0, [I, S] = b(
|
|
9480
9480
|
V
|
|
9481
|
-
), [_, x] = b([]), [R, A] = b(), [N, K] = b([]), [j, W] = b(), [M,
|
|
9481
|
+
), [_, x] = b([]), [R, A] = b(), [N, K] = b([]), [j, W] = b(), [M, Y] = b(0), [z, Q] = b(!1), [U, H] = b(!1), [E, L] = b(), { t: $ } = he(), de = re(), Z = re(), oe = te(
|
|
9482
9482
|
dt
|
|
9483
9483
|
), {
|
|
9484
9484
|
setCurrentView: ve,
|
|
9485
|
-
setCurrentId:
|
|
9485
|
+
setCurrentId: X,
|
|
9486
9486
|
tabs: ae,
|
|
9487
9487
|
activeKey: xe,
|
|
9488
9488
|
openAction: De,
|
|
@@ -9490,25 +9490,25 @@ function Ld(e, t) {
|
|
|
9490
9490
|
} = oe || {};
|
|
9491
9491
|
Is(
|
|
9492
9492
|
"ctrl+g,command+g",
|
|
9493
|
-
(
|
|
9494
|
-
|
|
9493
|
+
(G) => {
|
|
9494
|
+
G.preventDefault(), le();
|
|
9495
9495
|
},
|
|
9496
9496
|
[xe, ae, w, R, N]
|
|
9497
9497
|
);
|
|
9498
|
-
function ke(
|
|
9499
|
-
S(
|
|
9498
|
+
function ke(G) {
|
|
9499
|
+
S(G), X == null || X(G);
|
|
9500
9500
|
}
|
|
9501
|
-
function ue(
|
|
9502
|
-
v(
|
|
9501
|
+
function ue(G) {
|
|
9502
|
+
v(G);
|
|
9503
9503
|
const Se = { action_id: h, action_type: m };
|
|
9504
|
-
ve == null || ve({ ...
|
|
9504
|
+
ve == null || ve({ ...G, extra: Se });
|
|
9505
9505
|
}
|
|
9506
9506
|
ht(t, () => ({
|
|
9507
9507
|
canWeClose: Le
|
|
9508
9508
|
}));
|
|
9509
9509
|
const Fe = async () => {
|
|
9510
9510
|
O(!0);
|
|
9511
|
-
const
|
|
9511
|
+
const G = [], Se = [];
|
|
9512
9512
|
for (const be of s) {
|
|
9513
9513
|
const [pe, se] = be;
|
|
9514
9514
|
se !== "dashboard" ? Se.push({
|
|
@@ -9543,7 +9543,7 @@ function Ld(e, t) {
|
|
|
9543
9543
|
res_model: o,
|
|
9544
9544
|
view_id: We[0],
|
|
9545
9545
|
view_type: We[1]
|
|
9546
|
-
}),
|
|
9546
|
+
}), G.push({
|
|
9547
9547
|
type: "dashboard",
|
|
9548
9548
|
id: r.active_id,
|
|
9549
9549
|
model: o,
|
|
@@ -9553,14 +9553,14 @@ function Ld(e, t) {
|
|
|
9553
9553
|
break;
|
|
9554
9554
|
}
|
|
9555
9555
|
case "form": {
|
|
9556
|
-
|
|
9556
|
+
G.push({
|
|
9557
9557
|
...se,
|
|
9558
9558
|
type: pe
|
|
9559
9559
|
});
|
|
9560
9560
|
break;
|
|
9561
9561
|
}
|
|
9562
9562
|
case "tree": {
|
|
9563
|
-
|
|
9563
|
+
G.push({
|
|
9564
9564
|
...se,
|
|
9565
9565
|
isExpandable: g,
|
|
9566
9566
|
type: pe
|
|
@@ -9568,7 +9568,7 @@ function Ld(e, t) {
|
|
|
9568
9568
|
break;
|
|
9569
9569
|
}
|
|
9570
9570
|
case "graph": {
|
|
9571
|
-
|
|
9571
|
+
G.push({
|
|
9572
9572
|
...se,
|
|
9573
9573
|
type: pe
|
|
9574
9574
|
});
|
|
@@ -9577,38 +9577,38 @@ function Ld(e, t) {
|
|
|
9577
9577
|
}
|
|
9578
9578
|
}
|
|
9579
9579
|
let ge;
|
|
9580
|
-
!f &&
|
|
9580
|
+
!f && G.find((be) => be.type === "tree") ? ge = G.find(
|
|
9581
9581
|
(pe) => pe.type === "tree"
|
|
9582
|
-
) : f ? ge =
|
|
9582
|
+
) : f ? ge = G.find((pe) => f.id ? pe.type === f.type && pe.view_id === f.id : pe.type === f.type) : ge = G.find(
|
|
9583
9583
|
(pe) => pe.type === "form"
|
|
9584
9584
|
), ge || (Qe(
|
|
9585
9585
|
`Error determining the first view to show for model ${o}.
|
|
9586
9586
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
9587
|
-
), Ee == null || Ee(d)), ue(ge), F(
|
|
9587
|
+
), Ee == null || Ee(d)), ue(ge), F(G), O(!1);
|
|
9588
9588
|
};
|
|
9589
9589
|
l({ tabKey: d, canWeClose: Le }), fe(() => {
|
|
9590
|
-
const
|
|
9591
|
-
ue(Se ||
|
|
9590
|
+
const G = T.find((_e) => _e.type === "tree"), Se = T.find((_e) => f.id ? _e.type === f.type && _e.view_id === f.id : _e.type === f.type);
|
|
9591
|
+
ue(Se || G), p ? X == null || X(V) : (ke(void 0), A(void 0)), Fe();
|
|
9592
9592
|
}, [o, s, p]), fe(() => {
|
|
9593
9593
|
if (xe === d) {
|
|
9594
|
-
|
|
9595
|
-
const
|
|
9596
|
-
ve == null || ve({ ...w, extra:
|
|
9594
|
+
X == null || X(I);
|
|
9595
|
+
const G = { action_id: h, action_type: m };
|
|
9596
|
+
ve == null || ve({ ...w, extra: G });
|
|
9597
9597
|
}
|
|
9598
9598
|
}, [ae, xe]);
|
|
9599
9599
|
async function Le() {
|
|
9600
9600
|
return w && w.type === "form" ? await de.current.cancelUnsavedChanges() : !0;
|
|
9601
9601
|
}
|
|
9602
9602
|
async function le() {
|
|
9603
|
-
xe === d && (w.type === "form" && !await de.current.cancelUnsavedChanges() ||
|
|
9603
|
+
xe === d && (w.type === "form" && !await de.current.cancelUnsavedChanges() || Q(!0));
|
|
9604
9604
|
}
|
|
9605
|
-
async function me(
|
|
9605
|
+
async function me(G, Se) {
|
|
9606
9606
|
var be;
|
|
9607
|
-
|
|
9607
|
+
H(!0);
|
|
9608
9608
|
let _e, ge;
|
|
9609
|
-
if (
|
|
9609
|
+
if (G.length === 1) {
|
|
9610
9610
|
_e = "form", ge = [];
|
|
9611
|
-
const pe =
|
|
9611
|
+
const pe = G[0], se = N.findIndex((Pe) => Pe.id === pe);
|
|
9612
9612
|
let We;
|
|
9613
9613
|
if (se === -1) {
|
|
9614
9614
|
try {
|
|
@@ -9620,15 +9620,15 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9620
9620
|
} catch {
|
|
9621
9621
|
}
|
|
9622
9622
|
if (!We) {
|
|
9623
|
-
|
|
9623
|
+
H(!1), Q(!1), mt($("idNotFound"));
|
|
9624
9624
|
return;
|
|
9625
9625
|
}
|
|
9626
9626
|
} else
|
|
9627
9627
|
We = N[se];
|
|
9628
9628
|
} else
|
|
9629
|
-
_e = "tree", ge = [["id", "in",
|
|
9630
|
-
if (
|
|
9631
|
-
ke(
|
|
9629
|
+
_e = "tree", ge = [["id", "in", G]];
|
|
9630
|
+
if (H(!1), Q(!1), Se && _e === "form") {
|
|
9631
|
+
ke(G[0]);
|
|
9632
9632
|
const pe = T.find(
|
|
9633
9633
|
(se) => se.type === "form"
|
|
9634
9634
|
);
|
|
@@ -9645,21 +9645,21 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9645
9645
|
initialView: { id: pe == null ? void 0 : pe[0], type: _e },
|
|
9646
9646
|
action_id: h,
|
|
9647
9647
|
action_type: m,
|
|
9648
|
-
res_id:
|
|
9648
|
+
res_id: G[0]
|
|
9649
9649
|
});
|
|
9650
9650
|
}
|
|
9651
9651
|
}
|
|
9652
9652
|
function Me() {
|
|
9653
|
-
return T.map((
|
|
9654
|
-
switch (
|
|
9653
|
+
return T.map((G) => {
|
|
9654
|
+
switch (G.type) {
|
|
9655
9655
|
case "form":
|
|
9656
9656
|
return /* @__PURE__ */ i(
|
|
9657
9657
|
Sd,
|
|
9658
9658
|
{
|
|
9659
9659
|
formRef: de,
|
|
9660
9660
|
currentId: I,
|
|
9661
|
-
visible: w.type ===
|
|
9662
|
-
formView:
|
|
9661
|
+
visible: w.type === G.type && w.view_id === G.view_id,
|
|
9662
|
+
formView: G,
|
|
9663
9663
|
model: o,
|
|
9664
9664
|
context: r,
|
|
9665
9665
|
domain: n,
|
|
@@ -9669,19 +9669,19 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9669
9669
|
setResults: K,
|
|
9670
9670
|
setCurrentItemIndex: A
|
|
9671
9671
|
},
|
|
9672
|
-
`${
|
|
9672
|
+
`${G.type}-${G.view_id}`
|
|
9673
9673
|
);
|
|
9674
9674
|
case "tree":
|
|
9675
9675
|
return /* @__PURE__ */ i(
|
|
9676
9676
|
Dd,
|
|
9677
9677
|
{
|
|
9678
|
-
visible: w.type ===
|
|
9678
|
+
visible: w.type === G.type && w.view_id === G.view_id,
|
|
9679
9679
|
limit: y,
|
|
9680
9680
|
model: o,
|
|
9681
9681
|
context: r,
|
|
9682
9682
|
domain: n,
|
|
9683
9683
|
formView: T.find((Se) => Se.type === "form"),
|
|
9684
|
-
treeView:
|
|
9684
|
+
treeView: G,
|
|
9685
9685
|
searchTreeRef: Z,
|
|
9686
9686
|
searchTreeNameSearch: E,
|
|
9687
9687
|
availableViews: T,
|
|
@@ -9690,30 +9690,30 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9690
9690
|
setCurrentId: ke,
|
|
9691
9691
|
setCurrentView: ue
|
|
9692
9692
|
},
|
|
9693
|
-
`${
|
|
9693
|
+
`${G.type}-${G.view_id}`
|
|
9694
9694
|
);
|
|
9695
9695
|
case "graph":
|
|
9696
9696
|
return /* @__PURE__ */ i(
|
|
9697
9697
|
xd,
|
|
9698
9698
|
{
|
|
9699
|
-
visible: w.type ===
|
|
9700
|
-
viewData:
|
|
9699
|
+
visible: w.type === G.type && w.view_id === G.view_id,
|
|
9700
|
+
viewData: G,
|
|
9701
9701
|
model: o,
|
|
9702
9702
|
context: r,
|
|
9703
9703
|
domain: n,
|
|
9704
9704
|
treeView: T.find((Se) => Se.type === "tree"),
|
|
9705
9705
|
formView: T.find((Se) => Se.type === "form")
|
|
9706
9706
|
},
|
|
9707
|
-
`${
|
|
9707
|
+
`${G.type}-${G.view_id}`
|
|
9708
9708
|
);
|
|
9709
9709
|
case "dashboard":
|
|
9710
9710
|
return /* @__PURE__ */ i(
|
|
9711
9711
|
Pd,
|
|
9712
9712
|
{
|
|
9713
|
-
dashboardData:
|
|
9714
|
-
visible: w.type ===
|
|
9713
|
+
dashboardData: G,
|
|
9714
|
+
visible: w.type === G.type && w.view_id === G.view_id
|
|
9715
9715
|
},
|
|
9716
|
-
`${
|
|
9716
|
+
`${G.type}-${G.view_id}`
|
|
9717
9717
|
);
|
|
9718
9718
|
}
|
|
9719
9719
|
});
|
|
@@ -9723,10 +9723,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9723
9723
|
de.current.clearAndReload();
|
|
9724
9724
|
else {
|
|
9725
9725
|
ke(void 0);
|
|
9726
|
-
const
|
|
9726
|
+
const G = T.find(
|
|
9727
9727
|
(Se) => Se.type === "form"
|
|
9728
9728
|
);
|
|
9729
|
-
ue(
|
|
9729
|
+
ue(G);
|
|
9730
9730
|
}
|
|
9731
9731
|
}
|
|
9732
9732
|
return C ? /* @__PURE__ */ i(je, {}) : w ? /* @__PURE__ */ D(
|
|
@@ -9749,7 +9749,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9749
9749
|
sorter: j,
|
|
9750
9750
|
setSorter: W,
|
|
9751
9751
|
totalItems: M,
|
|
9752
|
-
setTotalItems:
|
|
9752
|
+
setTotalItems: Y,
|
|
9753
9753
|
selectedRowItems: _,
|
|
9754
9754
|
setSelectedRowItems: x,
|
|
9755
9755
|
setSearchTreeNameSearch: L,
|
|
@@ -9763,9 +9763,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9763
9763
|
{
|
|
9764
9764
|
visible: z,
|
|
9765
9765
|
onIdSubmitted: me,
|
|
9766
|
-
isSearching:
|
|
9766
|
+
isSearching: U,
|
|
9767
9767
|
onCancel: () => {
|
|
9768
|
-
|
|
9768
|
+
Q(!1);
|
|
9769
9769
|
}
|
|
9770
9770
|
}
|
|
9771
9771
|
)
|
|
@@ -9921,10 +9921,10 @@ function Ud(e) {
|
|
|
9921
9921
|
domain: s = [],
|
|
9922
9922
|
visible: a = !0,
|
|
9923
9923
|
parentContext: l = {}
|
|
9924
|
-
} = e, [d, f] = b(!1), [u, c] = b(!1), [p, h] = b(), [m, g] = b(), [y, w] = b(), [v, T] = b(1), [F, C] = b(0), O = re(Ft), V = re([]), [I, S] = b(0), [_, x] = b([]), [R, A] = b(void 0), [N, K] = b(), [j, W] = b(), [M,
|
|
9925
|
-
|
|
9924
|
+
} = e, [d, f] = b(!1), [u, c] = b(!1), [p, h] = b(), [m, g] = b(), [y, w] = b(), [v, T] = b(1), [F, C] = b(0), O = re(Ft), V = re([]), [I, S] = b(0), [_, x] = b([]), [R, A] = b(void 0), [N, K] = b(), [j, W] = b(), [M, Y] = b(), [z, Q] = b(!1), U = re([]), H = (X) => {
|
|
9925
|
+
Q(!0), T(X), C((X - 1) * O.current);
|
|
9926
9926
|
}, E = async () => {
|
|
9927
|
-
const
|
|
9927
|
+
const X = U.current.length > 0 ? U.current : s, ae = Xt(V.current, X), { colors: xe } = Tt(m), { totalItems: De, results: Ee, attrsEvaluated: ke } = await k.getHandler().searchForTree({
|
|
9928
9928
|
params: ae,
|
|
9929
9929
|
limit: O.current,
|
|
9930
9930
|
offset: F,
|
|
@@ -9939,42 +9939,42 @@ function Ud(e) {
|
|
|
9939
9939
|
sorter: N,
|
|
9940
9940
|
fields: { ...m.fields, ...y.fields }
|
|
9941
9941
|
});
|
|
9942
|
-
|
|
9942
|
+
Q(!1), x(ue);
|
|
9943
9943
|
const Fe = await De;
|
|
9944
9944
|
S(Fe);
|
|
9945
9945
|
}, L = async () => {
|
|
9946
9946
|
try {
|
|
9947
|
-
|
|
9948
|
-
} catch (
|
|
9949
|
-
W(JSON.stringify(
|
|
9947
|
+
Q(!0), await E();
|
|
9948
|
+
} catch (X) {
|
|
9949
|
+
W(JSON.stringify(X));
|
|
9950
9950
|
}
|
|
9951
9951
|
};
|
|
9952
9952
|
fe(() => {
|
|
9953
9953
|
u && a && L();
|
|
9954
9954
|
}, [v, F, u, a]);
|
|
9955
|
-
const $ = async (
|
|
9956
|
-
c(!1), f(!0),
|
|
9955
|
+
const $ = async (X) => {
|
|
9956
|
+
c(!1), f(!0), Y(void 0);
|
|
9957
9957
|
try {
|
|
9958
|
-
|
|
9958
|
+
X === "action" ? await de() : await Z(), c(!0);
|
|
9959
9959
|
} catch (ae) {
|
|
9960
|
-
|
|
9960
|
+
Y(ae);
|
|
9961
9961
|
} finally {
|
|
9962
9962
|
f(!1);
|
|
9963
9963
|
}
|
|
9964
9964
|
}, de = async () => {
|
|
9965
|
-
const
|
|
9965
|
+
const X = await k.getHandler().getViewsForAction({
|
|
9966
9966
|
action: t,
|
|
9967
9967
|
context: l
|
|
9968
9968
|
});
|
|
9969
|
-
|
|
9969
|
+
U.current = X.domain, w(X.views.get("form")), g(X.views.get("tree")), h(X.model), O.current = X.limit;
|
|
9970
9970
|
}, Z = async () => {
|
|
9971
9971
|
h(n);
|
|
9972
|
-
const
|
|
9972
|
+
const X = await k.getHandler().getView({
|
|
9973
9973
|
model: n,
|
|
9974
9974
|
type: "form",
|
|
9975
9975
|
context: l
|
|
9976
9976
|
});
|
|
9977
|
-
w(
|
|
9977
|
+
w(X);
|
|
9978
9978
|
const ae = await k.getHandler().getView({
|
|
9979
9979
|
model: n,
|
|
9980
9980
|
type: "tree",
|
|
@@ -9986,8 +9986,8 @@ function Ud(e) {
|
|
|
9986
9986
|
fe(() => {
|
|
9987
9987
|
t ? $("action") : n && $("model");
|
|
9988
9988
|
}, [t, n]);
|
|
9989
|
-
const oe = (
|
|
9990
|
-
const { id: ae } =
|
|
9989
|
+
const oe = (X) => {
|
|
9990
|
+
const { id: ae } = X;
|
|
9991
9991
|
r({
|
|
9992
9992
|
id: ae,
|
|
9993
9993
|
model: p,
|
|
@@ -10004,16 +10004,16 @@ function Ud(e) {
|
|
|
10004
10004
|
page: v,
|
|
10005
10005
|
treeView: m,
|
|
10006
10006
|
results: _,
|
|
10007
|
-
onRequestPageChange:
|
|
10007
|
+
onRequestPageChange: H,
|
|
10008
10008
|
loading: z,
|
|
10009
10009
|
onRowClicked: oe,
|
|
10010
10010
|
colorsForResults: R,
|
|
10011
10011
|
sorter: N,
|
|
10012
|
-
onChangeSort: (
|
|
10013
|
-
K == null || K(
|
|
10012
|
+
onChangeSort: (X) => {
|
|
10013
|
+
K == null || K(X);
|
|
10014
10014
|
const ae = kt({
|
|
10015
10015
|
resultsToSort: _,
|
|
10016
|
-
sorter:
|
|
10016
|
+
sorter: X,
|
|
10017
10017
|
fields: { ...m.fields, ...y.fields }
|
|
10018
10018
|
});
|
|
10019
10019
|
x(ae);
|
|
@@ -10041,7 +10041,7 @@ const Gd = Wn(Ud), Yd = (e) => {
|
|
|
10041
10041
|
}, qd = (e) => {
|
|
10042
10042
|
const { model: t, domain: n = [], context: o = {}, view_id: r, manualIds: s } = e, [a, l] = b(!1), [d, f] = b(), [u, c] = b(), [p] = Xe(
|
|
10043
10043
|
k.getHandler().readForView
|
|
10044
|
-
), h =
|
|
10044
|
+
), h = J(async () => {
|
|
10045
10045
|
l(!0), f(void 0), s && n.push(["id", "in", s]);
|
|
10046
10046
|
try {
|
|
10047
10047
|
const m = await p({
|
|
@@ -10200,7 +10200,7 @@ function Xd(e, t) {
|
|
|
10200
10200
|
const W = parseInt(j.action_id[0], 10), M = $d({
|
|
10201
10201
|
actionId: W,
|
|
10202
10202
|
rootContext: o
|
|
10203
|
-
}).then((
|
|
10203
|
+
}).then((Y) => ({ ...K, actionData: Y }));
|
|
10204
10204
|
A.push(M);
|
|
10205
10205
|
}
|
|
10206
10206
|
}
|
|
@@ -10217,17 +10217,17 @@ function Xd(e, t) {
|
|
|
10217
10217
|
return !1;
|
|
10218
10218
|
if (!M.position)
|
|
10219
10219
|
return !0;
|
|
10220
|
-
const
|
|
10220
|
+
const Y = {
|
|
10221
10221
|
...JSON.parse(M.position.replace(/'/g, '"')),
|
|
10222
10222
|
id: M.id
|
|
10223
10223
|
};
|
|
10224
|
-
return JSON.stringify(W) !== JSON.stringify(
|
|
10224
|
+
return JSON.stringify(W) !== JSON.stringify(Y);
|
|
10225
10225
|
});
|
|
10226
10226
|
if (A.length === 0)
|
|
10227
10227
|
return;
|
|
10228
10228
|
const K = a.filter((W) => A.map((M) => M.id).includes(W.id)).map((W) => {
|
|
10229
10229
|
const M = {
|
|
10230
|
-
...A.find((
|
|
10230
|
+
...A.find((Y) => Y.id === W.id)
|
|
10231
10231
|
};
|
|
10232
10232
|
return delete M.id, { ...W }, {
|
|
10233
10233
|
...W,
|
|
@@ -10255,11 +10255,11 @@ function Xd(e, t) {
|
|
|
10255
10255
|
return d ? /* @__PURE__ */ i(gt, {}) : u ? /* @__PURE__ */ i(Je, { className: "mt-10 mb-20", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ i(Bd, { onPositionItemsChanged: _, children: a.map((R, A) => {
|
|
10256
10256
|
const { actionData: N, values: K } = R, { position: j, id: W } = K, {
|
|
10257
10257
|
actionId: M,
|
|
10258
|
-
actionType:
|
|
10258
|
+
actionType: Y,
|
|
10259
10259
|
key: z,
|
|
10260
|
-
title:
|
|
10261
|
-
views:
|
|
10262
|
-
model:
|
|
10260
|
+
title: Q,
|
|
10261
|
+
views: U,
|
|
10262
|
+
model: H,
|
|
10263
10263
|
context: E,
|
|
10264
10264
|
domain: L,
|
|
10265
10265
|
initialView: $,
|
|
@@ -10277,10 +10277,10 @@ function Xd(e, t) {
|
|
|
10277
10277
|
oe = /* @__PURE__ */ i(
|
|
10278
10278
|
xe,
|
|
10279
10279
|
{
|
|
10280
|
-
view_id:
|
|
10280
|
+
view_id: U.filter(
|
|
10281
10281
|
(De) => De[1] === "graph"
|
|
10282
10282
|
)[0][0],
|
|
10283
|
-
model:
|
|
10283
|
+
model: H,
|
|
10284
10284
|
context: E,
|
|
10285
10285
|
domain: L,
|
|
10286
10286
|
limit: de
|
|
@@ -10288,18 +10288,18 @@ function Xd(e, t) {
|
|
|
10288
10288
|
W
|
|
10289
10289
|
);
|
|
10290
10290
|
} else if (($ == null ? void 0 : $.type) === "form")
|
|
10291
|
-
oe = /* @__PURE__ */ i(Yd, { model:
|
|
10291
|
+
oe = /* @__PURE__ */ i(Yd, { model: H, actionDomain: L }, W);
|
|
10292
10292
|
else if (($ == null ? void 0 : $.type) === "tree")
|
|
10293
10293
|
oe = /* @__PURE__ */ i(
|
|
10294
10294
|
Gd,
|
|
10295
10295
|
{
|
|
10296
|
-
model:
|
|
10296
|
+
model: H,
|
|
10297
10297
|
domain: L,
|
|
10298
|
-
view_id:
|
|
10298
|
+
view_id: U.filter(
|
|
10299
10299
|
(ae) => ae[1] === "tree"
|
|
10300
10300
|
)[0][0],
|
|
10301
10301
|
onRowClicked: (ae) => {
|
|
10302
|
-
const xe =
|
|
10302
|
+
const xe = U.find((De) => {
|
|
10303
10303
|
const [, Ee] = De;
|
|
10304
10304
|
return Ee === "form";
|
|
10305
10305
|
});
|
|
@@ -10330,11 +10330,11 @@ function Xd(e, t) {
|
|
|
10330
10330
|
ti,
|
|
10331
10331
|
{
|
|
10332
10332
|
action_id: M,
|
|
10333
|
-
action_type:
|
|
10333
|
+
action_type: Y,
|
|
10334
10334
|
tabKey: z,
|
|
10335
|
-
title:
|
|
10336
|
-
views:
|
|
10337
|
-
model:
|
|
10335
|
+
title: Q,
|
|
10336
|
+
views: U,
|
|
10337
|
+
model: H,
|
|
10338
10338
|
context: E,
|
|
10339
10339
|
domain: L,
|
|
10340
10340
|
setCanWeClose: () => {
|
|
@@ -10346,12 +10346,12 @@ function Xd(e, t) {
|
|
|
10346
10346
|
);
|
|
10347
10347
|
}
|
|
10348
10348
|
let ve;
|
|
10349
|
-
const
|
|
10349
|
+
const X = U.find((ae) => {
|
|
10350
10350
|
const [, xe] = ae;
|
|
10351
10351
|
return xe === "tree";
|
|
10352
10352
|
});
|
|
10353
|
-
if (
|
|
10354
|
-
const [ae, xe] =
|
|
10353
|
+
if (X) {
|
|
10354
|
+
const [ae, xe] = X, {
|
|
10355
10355
|
actionId: De,
|
|
10356
10356
|
actionType: Ee,
|
|
10357
10357
|
title: ke,
|
|
@@ -10372,7 +10372,7 @@ function Xd(e, t) {
|
|
|
10372
10372
|
Wd,
|
|
10373
10373
|
{
|
|
10374
10374
|
id: W,
|
|
10375
|
-
title:
|
|
10375
|
+
title: Q,
|
|
10376
10376
|
parms: Z,
|
|
10377
10377
|
action: ve,
|
|
10378
10378
|
openAction: h,
|
|
@@ -10651,16 +10651,16 @@ function xu(e, t) {
|
|
|
10651
10651
|
res_model: j,
|
|
10652
10652
|
views: W,
|
|
10653
10653
|
name: M,
|
|
10654
|
-
target:
|
|
10654
|
+
target: Y,
|
|
10655
10655
|
view_type: z,
|
|
10656
|
-
limit:
|
|
10657
|
-
} = _,
|
|
10656
|
+
limit: Q
|
|
10657
|
+
} = _, U = z === "tree", H = [];
|
|
10658
10658
|
for (const L of W) {
|
|
10659
10659
|
const [$, de] = L;
|
|
10660
10660
|
if ($)
|
|
10661
|
-
|
|
10661
|
+
H.push(L);
|
|
10662
10662
|
else if (de === "dashboard")
|
|
10663
|
-
|
|
10663
|
+
H.push([void 0, "dashboard"]);
|
|
10664
10664
|
else {
|
|
10665
10665
|
const { view_id: Z } = await k.getHandler().getView({
|
|
10666
10666
|
model: j,
|
|
@@ -10668,34 +10668,34 @@ function xu(e, t) {
|
|
|
10668
10668
|
id: $,
|
|
10669
10669
|
context: { ...l, ...N }
|
|
10670
10670
|
});
|
|
10671
|
-
|
|
10671
|
+
H.push([Z, de]);
|
|
10672
10672
|
}
|
|
10673
10673
|
}
|
|
10674
10674
|
let E;
|
|
10675
10675
|
if (V) {
|
|
10676
|
-
const [L, $] =
|
|
10676
|
+
const [L, $] = H.find(
|
|
10677
10677
|
([de, Z]) => Z === V
|
|
10678
10678
|
);
|
|
10679
10679
|
E = { id: L, type: $ };
|
|
10680
10680
|
} else {
|
|
10681
|
-
const [L, $] =
|
|
10681
|
+
const [L, $] = H[0];
|
|
10682
10682
|
E = { id: L, type: $ };
|
|
10683
10683
|
}
|
|
10684
10684
|
T({
|
|
10685
10685
|
domain: [...K, ...S],
|
|
10686
10686
|
context: { ...l, ...N },
|
|
10687
10687
|
model: j,
|
|
10688
|
-
views:
|
|
10688
|
+
views: H,
|
|
10689
10689
|
title: M,
|
|
10690
|
-
target:
|
|
10690
|
+
target: Y,
|
|
10691
10691
|
initialView: E,
|
|
10692
10692
|
action_type: x,
|
|
10693
10693
|
action_id: A,
|
|
10694
10694
|
values: C,
|
|
10695
10695
|
forced_values: O,
|
|
10696
10696
|
res_id: I,
|
|
10697
|
-
treeExpandable:
|
|
10698
|
-
limit:
|
|
10697
|
+
treeExpandable: U,
|
|
10698
|
+
limit: Q
|
|
10699
10699
|
});
|
|
10700
10700
|
}
|
|
10701
10701
|
function g({
|
|
@@ -10731,7 +10731,7 @@ function xu(e, t) {
|
|
|
10731
10731
|
target: A,
|
|
10732
10732
|
string: N,
|
|
10733
10733
|
limit: K
|
|
10734
|
-
} = F, [j, W] = R[0], M = { id: j, type: W },
|
|
10734
|
+
} = F, [j, W] = R[0], M = { id: j, type: W }, Y = St({
|
|
10735
10735
|
context: _,
|
|
10736
10736
|
values: { ...O, ...a },
|
|
10737
10737
|
fields: C
|
|
@@ -10742,13 +10742,13 @@ function xu(e, t) {
|
|
|
10742
10742
|
values: { ...O, ...a }
|
|
10743
10743
|
}),
|
|
10744
10744
|
fields: C,
|
|
10745
|
-
context: { ...l, ...
|
|
10745
|
+
context: { ...l, ...Y }
|
|
10746
10746
|
}) : [];
|
|
10747
10747
|
T({
|
|
10748
10748
|
model: S,
|
|
10749
10749
|
target: A,
|
|
10750
10750
|
views: R,
|
|
10751
|
-
context: { ...l, ...
|
|
10751
|
+
context: { ...l, ...Y },
|
|
10752
10752
|
domain: z,
|
|
10753
10753
|
title: N,
|
|
10754
10754
|
initialView: M,
|
|
@@ -10781,14 +10781,14 @@ function xu(e, t) {
|
|
|
10781
10781
|
name: j,
|
|
10782
10782
|
target: W,
|
|
10783
10783
|
view_type: M,
|
|
10784
|
-
limit:
|
|
10785
|
-
} = x, z = M === "tree",
|
|
10784
|
+
limit: Y
|
|
10785
|
+
} = x, z = M === "tree", Q = [];
|
|
10786
10786
|
for (const L of K) {
|
|
10787
10787
|
const [$, de] = L;
|
|
10788
10788
|
if ($)
|
|
10789
|
-
|
|
10789
|
+
Q.push(L);
|
|
10790
10790
|
else if (de === "dashboard")
|
|
10791
|
-
|
|
10791
|
+
Q.push([void 0, "dashboard"]);
|
|
10792
10792
|
else {
|
|
10793
10793
|
const { view_id: Z } = await k.getHandler().getView({
|
|
10794
10794
|
model: N,
|
|
@@ -10796,21 +10796,21 @@ function xu(e, t) {
|
|
|
10796
10796
|
id: $,
|
|
10797
10797
|
context: { ...l, ...R }
|
|
10798
10798
|
});
|
|
10799
|
-
|
|
10799
|
+
Q.push([Z, de]);
|
|
10800
10800
|
}
|
|
10801
10801
|
}
|
|
10802
|
-
let
|
|
10802
|
+
let U, H;
|
|
10803
10803
|
if (I == null) {
|
|
10804
|
-
const L =
|
|
10805
|
-
|
|
10804
|
+
const L = Q.find(($) => $[0] === void 0);
|
|
10805
|
+
U = void 0, H = L[1];
|
|
10806
10806
|
} else
|
|
10807
|
-
[
|
|
10808
|
-
const E = { id:
|
|
10807
|
+
[U, H] = Q.find((L) => L[0] === void 0 ? !1 : L[0] === I);
|
|
10808
|
+
const E = { id: U, type: H };
|
|
10809
10809
|
T({
|
|
10810
10810
|
domain: A,
|
|
10811
10811
|
context: { ...l, ...R },
|
|
10812
10812
|
model: N,
|
|
10813
|
-
views:
|
|
10813
|
+
views: Q,
|
|
10814
10814
|
title: j,
|
|
10815
10815
|
target: W,
|
|
10816
10816
|
initialView: E,
|
|
@@ -10818,7 +10818,7 @@ function xu(e, t) {
|
|
|
10818
10818
|
action_type: O,
|
|
10819
10819
|
res_id: V,
|
|
10820
10820
|
treeExpandable: z,
|
|
10821
|
-
limit: S && (
|
|
10821
|
+
limit: S && (Y === 0 || Y === !1) ? Ft : Y
|
|
10822
10822
|
});
|
|
10823
10823
|
}
|
|
10824
10824
|
async function v({
|
|
@@ -10857,7 +10857,7 @@ function xu(e, t) {
|
|
|
10857
10857
|
}) {
|
|
10858
10858
|
const M = ar();
|
|
10859
10859
|
if (S !== "current") {
|
|
10860
|
-
const
|
|
10860
|
+
const Y = await k.getHandler().getView({
|
|
10861
10861
|
model: O,
|
|
10862
10862
|
type: "form",
|
|
10863
10863
|
id: _.type === "form" ? _.id : void 0,
|
|
@@ -10866,17 +10866,17 @@ function xu(e, t) {
|
|
|
10866
10866
|
c.current.openActionModal({
|
|
10867
10867
|
domain: F,
|
|
10868
10868
|
model: O,
|
|
10869
|
-
formView:
|
|
10869
|
+
formView: Y,
|
|
10870
10870
|
context: { ...l, ...C },
|
|
10871
10871
|
actionData: {
|
|
10872
10872
|
action_id: x,
|
|
10873
10873
|
action_type: R,
|
|
10874
10874
|
res_id: A,
|
|
10875
|
-
view_id:
|
|
10875
|
+
view_id: Y.view_id
|
|
10876
10876
|
}
|
|
10877
10877
|
});
|
|
10878
10878
|
} else {
|
|
10879
|
-
const
|
|
10879
|
+
const Y = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
|
|
10880
10880
|
g({
|
|
10881
10881
|
title: I,
|
|
10882
10882
|
action: {
|
|
@@ -10895,7 +10895,7 @@ function xu(e, t) {
|
|
|
10895
10895
|
context: { ...l, ...C },
|
|
10896
10896
|
domain: F,
|
|
10897
10897
|
setCanWeClose: h,
|
|
10898
|
-
initialView:
|
|
10898
|
+
initialView: Y,
|
|
10899
10899
|
res_id: A,
|
|
10900
10900
|
formDefaultValues: N,
|
|
10901
10901
|
formForcedValues: K,
|
|
@@ -11080,7 +11080,7 @@ const { useToken: Ou } = Ke, xf = (e) => {
|
|
|
11080
11080
|
const R = x;
|
|
11081
11081
|
(R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && m(R);
|
|
11082
11082
|
}
|
|
11083
|
-
const V =
|
|
11083
|
+
const V = J(async () => {
|
|
11084
11084
|
if (!F)
|
|
11085
11085
|
return;
|
|
11086
11086
|
const x = await n(F);
|
|
@@ -11090,7 +11090,7 @@ const { useToken: Ou } = Ke, xf = (e) => {
|
|
|
11090
11090
|
var x;
|
|
11091
11091
|
(x = p == null ? void 0 : p.current) == null || x.close(), T == null || T({ model: "ir.ui.view_sc" });
|
|
11092
11092
|
}
|
|
11093
|
-
const S =
|
|
11093
|
+
const S = J(async () => {
|
|
11094
11094
|
const x = await t();
|
|
11095
11095
|
return x.length === 0 ? [
|
|
11096
11096
|
{
|
|
@@ -11107,7 +11107,7 @@ const { useToken: Ou } = Ke, xf = (e) => {
|
|
|
11107
11107
|
}))
|
|
11108
11108
|
}
|
|
11109
11109
|
];
|
|
11110
|
-
}, [t, u]), _ =
|
|
11110
|
+
}, [t, u]), _ = J(async () => {
|
|
11111
11111
|
if (a && d)
|
|
11112
11112
|
await r(d);
|
|
11113
11113
|
else {
|