@gisce/react-ooui 2.16.0-alpha.16 → 2.16.0-alpha.18
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
|
@@ -374,7 +374,7 @@ const Co = (e) => {
|
|
|
374
374
|
async function x() {
|
|
375
375
|
c && r && (g(!0), await m({ type: c, action: r, context: d }), g(!1));
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function I() {
|
|
378
378
|
if (l) {
|
|
379
379
|
on({
|
|
380
380
|
confirmMessage: l,
|
|
@@ -394,7 +394,7 @@ const Co = (e) => {
|
|
|
394
394
|
_i.Button,
|
|
395
395
|
{
|
|
396
396
|
disabled: !a || p,
|
|
397
|
-
onClick:
|
|
397
|
+
onClick: I,
|
|
398
398
|
icon: /* @__PURE__ */ i(bn, {}),
|
|
399
399
|
type: f ? "primary" : void 0,
|
|
400
400
|
overlay: /* @__PURE__ */ i(
|
|
@@ -448,8 +448,8 @@ const Co = (e) => {
|
|
|
448
448
|
if (y)
|
|
449
449
|
return /* @__PURE__ */ i(ft, {});
|
|
450
450
|
if (d) {
|
|
451
|
-
const
|
|
452
|
-
return
|
|
451
|
+
const I = at(d);
|
|
452
|
+
return I && /* @__PURE__ */ i(I, {});
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
return /* @__PURE__ */ i(
|
|
@@ -536,7 +536,7 @@ const So = (e) => {
|
|
|
536
536
|
p(!0);
|
|
537
537
|
try {
|
|
538
538
|
const R = await x();
|
|
539
|
-
await
|
|
539
|
+
await I(R);
|
|
540
540
|
} catch (R) {
|
|
541
541
|
Ze(R);
|
|
542
542
|
}
|
|
@@ -553,16 +553,16 @@ const So = (e) => {
|
|
|
553
553
|
}));
|
|
554
554
|
return f == null || f(C), C;
|
|
555
555
|
}
|
|
556
|
-
async function
|
|
556
|
+
async function I(R) {
|
|
557
557
|
const C = {};
|
|
558
558
|
for (const _ of R) {
|
|
559
|
-
const
|
|
559
|
+
const O = (await k.getHandler().readObjects({
|
|
560
560
|
model: o,
|
|
561
561
|
ids: [r],
|
|
562
562
|
fieldsToRetrieve: [s],
|
|
563
563
|
context: { lang: _.code }
|
|
564
564
|
}))[0];
|
|
565
|
-
C[_.code] =
|
|
565
|
+
C[_.code] = O[s] || "";
|
|
566
566
|
}
|
|
567
567
|
w.current = C, g(C);
|
|
568
568
|
}
|
|
@@ -1111,7 +1111,7 @@ const Sa = (e) => {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
return s ? /* @__PURE__ */ i(Be, {}) : c ? /* @__PURE__ */ i(Xe, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(xa, { ooui: t, views: u }) });
|
|
1113
1113
|
}, xa = (e) => {
|
|
1114
|
-
const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, c] = b(!1), [l, u] = b(), [f, d] = b(!1), [p, h] = b(), { relation: m, context: y, readOnly: g, summaryField: w, titleField: S } = o, x = s.filter((R) => R.values),
|
|
1114
|
+
const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, c] = b(!1), [l, u] = b(), [f, d] = b(!1), [p, h] = b(), { relation: m, context: y, readOnly: g, summaryField: w, titleField: S } = o, x = s.filter((R) => R.values), I = ee(Le), { getContext: v } = I || {};
|
|
1115
1115
|
wt(() => {
|
|
1116
1116
|
T();
|
|
1117
1117
|
}, [s]);
|
|
@@ -1145,7 +1145,7 @@ const Sa = (e) => {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
return l ? /* @__PURE__ */ i(Xe, { className: "mt-10", message: l, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(se, { children: [
|
|
1147
1147
|
/* @__PURE__ */ i(Ln, { style: { padding: "1rem" }, children: x.map((R, C) => {
|
|
1148
|
-
var _,
|
|
1148
|
+
var _, O;
|
|
1149
1149
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ D(Ln.Item, { children: [
|
|
1150
1150
|
/* @__PURE__ */ i(
|
|
1151
1151
|
"div",
|
|
@@ -1173,7 +1173,7 @@ const Sa = (e) => {
|
|
|
1173
1173
|
)
|
|
1174
1174
|
), d(!0);
|
|
1175
1175
|
},
|
|
1176
|
-
children: (
|
|
1176
|
+
children: (O = R.values) == null ? void 0 : O[w]
|
|
1177
1177
|
}
|
|
1178
1178
|
)
|
|
1179
1179
|
] }, C) }, C);
|
|
@@ -1554,17 +1554,17 @@ async function Do({
|
|
|
1554
1554
|
view_type: p
|
|
1555
1555
|
} = s, h = p === "tree", m = [];
|
|
1556
1556
|
for (const S of u) {
|
|
1557
|
-
const [x,
|
|
1557
|
+
const [x, I] = S;
|
|
1558
1558
|
if (x)
|
|
1559
1559
|
m.push(S);
|
|
1560
1560
|
else {
|
|
1561
1561
|
const { view_id: v } = await k.getHandler().getView({
|
|
1562
1562
|
model: l,
|
|
1563
|
-
type:
|
|
1563
|
+
type: I,
|
|
1564
1564
|
id: x,
|
|
1565
1565
|
context: { ...t, ...a }
|
|
1566
1566
|
});
|
|
1567
|
-
m.push([v,
|
|
1567
|
+
m.push([v, I]);
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
1570
|
const [y, g] = m[0], w = { id: y, type: g };
|
|
@@ -1594,12 +1594,12 @@ const _a = (e) => {
|
|
|
1594
1594
|
...h,
|
|
1595
1595
|
...d()
|
|
1596
1596
|
}
|
|
1597
|
-
}), { views: S } = w, x = S.find((
|
|
1598
|
-
const [, v] =
|
|
1597
|
+
}), { views: S } = w, x = S.find((I) => {
|
|
1598
|
+
const [, v] = I;
|
|
1599
1599
|
return v === "tree";
|
|
1600
1600
|
});
|
|
1601
1601
|
if (x) {
|
|
1602
|
-
const [
|
|
1602
|
+
const [I, v] = x, {
|
|
1603
1603
|
actionId: V,
|
|
1604
1604
|
actionType: T,
|
|
1605
1605
|
title: R,
|
|
@@ -1611,7 +1611,7 @@ const _a = (e) => {
|
|
|
1611
1611
|
name: R,
|
|
1612
1612
|
res_id: !1,
|
|
1613
1613
|
res_model: C,
|
|
1614
|
-
view_id:
|
|
1614
|
+
view_id: I,
|
|
1615
1615
|
view_type: v,
|
|
1616
1616
|
overrideUnsettedLimit: !0,
|
|
1617
1617
|
values: {
|
|
@@ -1847,9 +1847,9 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1847
1847
|
field: u,
|
|
1848
1848
|
operator: f,
|
|
1849
1849
|
manualIds: d
|
|
1850
|
-
} = e, [p, h] = b(!1), [m, y] = b(), [g, w] = b(), [S, x] = b(), [
|
|
1850
|
+
} = e, [p, h] = b(!1), [m, y] = b(), [g, w] = b(), [S, x] = b(), [I, v] = b(), [V, T] = b(), [R, C] = b(), [_] = qe(
|
|
1851
1851
|
k.getHandler().searchAllIds
|
|
1852
|
-
), [
|
|
1852
|
+
), [O] = qe(
|
|
1853
1853
|
k.getHandler().readObjects
|
|
1854
1854
|
), [F] = qe(
|
|
1855
1855
|
k.getHandler().searchCount
|
|
@@ -1872,7 +1872,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1872
1872
|
params: j,
|
|
1873
1873
|
model: t,
|
|
1874
1874
|
context: o
|
|
1875
|
-
}), Z = await
|
|
1875
|
+
}), Z = await O({
|
|
1876
1876
|
model: t,
|
|
1877
1877
|
ids: z,
|
|
1878
1878
|
fieldsToRetrieve: [u],
|
|
@@ -1895,7 +1895,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1895
1895
|
params: j,
|
|
1896
1896
|
model: t,
|
|
1897
1897
|
context: o
|
|
1898
|
-
}), z = await
|
|
1898
|
+
}), z = await O({
|
|
1899
1899
|
model: t,
|
|
1900
1900
|
ids: P,
|
|
1901
1901
|
fieldsToRetrieve: [u],
|
|
@@ -1958,7 +1958,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1958
1958
|
value: m,
|
|
1959
1959
|
totalValue: S,
|
|
1960
1960
|
percent: g,
|
|
1961
|
-
color:
|
|
1961
|
+
color: I,
|
|
1962
1962
|
icon: V,
|
|
1963
1963
|
suffix: l,
|
|
1964
1964
|
showPercent: a
|
|
@@ -1977,7 +1977,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1977
1977
|
k.getHandler().getFields
|
|
1978
1978
|
), [x] = qe(
|
|
1979
1979
|
k.getHandler().readObjects
|
|
1980
|
-
), [
|
|
1980
|
+
), [I] = qe(k.getHandler().search), v = X(async () => {
|
|
1981
1981
|
u(!0), d(void 0), w(n.type || "line");
|
|
1982
1982
|
const V = Ma({ ooui: n });
|
|
1983
1983
|
let T, R;
|
|
@@ -1993,7 +1993,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
1993
1993
|
methods: {
|
|
1994
1994
|
getFields: S,
|
|
1995
1995
|
readObjects: x,
|
|
1996
|
-
search:
|
|
1996
|
+
search: I
|
|
1997
1997
|
}
|
|
1998
1998
|
}));
|
|
1999
1999
|
} catch (C) {
|
|
@@ -2038,7 +2038,7 @@ const { getValueForOperator: Pr } = so, Ea = (e) => {
|
|
|
2038
2038
|
n,
|
|
2039
2039
|
p,
|
|
2040
2040
|
x,
|
|
2041
|
-
|
|
2041
|
+
I,
|
|
2042
2042
|
g,
|
|
2043
2043
|
a
|
|
2044
2044
|
]);
|
|
@@ -2411,13 +2411,13 @@ const Ga = ({
|
|
|
2411
2411
|
setSorter: w,
|
|
2412
2412
|
totalItems: S,
|
|
2413
2413
|
setTotalItems: x,
|
|
2414
|
-
setSelectedRowItems:
|
|
2414
|
+
setSelectedRowItems: I,
|
|
2415
2415
|
selectedRowItems: v,
|
|
2416
2416
|
searchTreeNameSearch: V,
|
|
2417
2417
|
setSearchTreeNameSearch: T,
|
|
2418
2418
|
goToResourceId: R,
|
|
2419
2419
|
limit: C
|
|
2420
|
-
} = e, [_,
|
|
2420
|
+
} = e, [_, O] = b(!1), [F, N] = b(!1), [A, W] = b(!1), [L, H] = b(!0), [j, P] = b(!0), [z, Z] = b([]), [te, U] = b(!1), [E, J] = b([]), [M, Q] = b(!1), [q, me] = b(!0), [ae, Y] = b(), [de, pe] = b({}), [Ee, Me] = b(
|
|
2421
2421
|
C !== void 0 ? C : Ot
|
|
2422
2422
|
), [De, ke] = b(o);
|
|
2423
2423
|
le(() => {
|
|
@@ -2450,7 +2450,7 @@ const Ga = ({
|
|
|
2450
2450
|
setCurrentView: r,
|
|
2451
2451
|
availableViews: s,
|
|
2452
2452
|
formIsSaving: _,
|
|
2453
|
-
setFormIsSaving:
|
|
2453
|
+
setFormIsSaving: O,
|
|
2454
2454
|
formHasChanges: F,
|
|
2455
2455
|
setFormHasChanges: N,
|
|
2456
2456
|
formRef: a,
|
|
@@ -2473,7 +2473,7 @@ const Ga = ({
|
|
|
2473
2473
|
attachments: z,
|
|
2474
2474
|
setAttachments: Z,
|
|
2475
2475
|
selectedRowItems: v,
|
|
2476
|
-
setSelectedRowItems:
|
|
2476
|
+
setSelectedRowItems: I,
|
|
2477
2477
|
duplicatingItem: te,
|
|
2478
2478
|
setDuplicatingItem: U,
|
|
2479
2479
|
setSearchParams: J,
|
|
@@ -2986,8 +2986,8 @@ const Ft = ({
|
|
|
2986
2986
|
context: { ...w == null ? void 0 : w(), ...h }
|
|
2987
2987
|
})).map((C) => {
|
|
2988
2988
|
const _ = C[y];
|
|
2989
|
-
let
|
|
2990
|
-
return Array.isArray(_) && (
|
|
2989
|
+
let O = _;
|
|
2990
|
+
return Array.isArray(_) && (O = _[1]), { label: O, value: C.id };
|
|
2991
2991
|
});
|
|
2992
2992
|
c(R);
|
|
2993
2993
|
} catch (T) {
|
|
@@ -2996,7 +2996,7 @@ const Ft = ({
|
|
|
2996
2996
|
d(!1);
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
const
|
|
2999
|
+
const I = (V) => {
|
|
3000
3000
|
const T = r.map((C) => V.includes(C.id) ? C.operation === "pendingRemove" ? {
|
|
3001
3001
|
...C,
|
|
3002
3002
|
operation: "pendingLink"
|
|
@@ -3007,15 +3007,15 @@ const Ft = ({
|
|
|
3007
3007
|
}, v = (V) => {
|
|
3008
3008
|
const { label: T, closable: R, onClose: C } = V, _ = (F) => {
|
|
3009
3009
|
F.preventDefault(), F.stopPropagation();
|
|
3010
|
-
},
|
|
3010
|
+
}, O = tn(T);
|
|
3011
3011
|
return /* @__PURE__ */ i(
|
|
3012
3012
|
gr,
|
|
3013
3013
|
{
|
|
3014
|
-
color:
|
|
3014
|
+
color: O,
|
|
3015
3015
|
onMouseDown: _,
|
|
3016
3016
|
closable: R,
|
|
3017
3017
|
onClose: C,
|
|
3018
|
-
closeIcon: /* @__PURE__ */ i("span", { style: { color:
|
|
3018
|
+
closeIcon: /* @__PURE__ */ i("span", { style: { color: O }, children: "X" }),
|
|
3019
3019
|
children: T
|
|
3020
3020
|
}
|
|
3021
3021
|
);
|
|
@@ -3029,7 +3029,7 @@ const Ft = ({
|
|
|
3029
3029
|
bordered: !m,
|
|
3030
3030
|
disabled: m,
|
|
3031
3031
|
options: a,
|
|
3032
|
-
onChange:
|
|
3032
|
+
onChange: I,
|
|
3033
3033
|
loading: f,
|
|
3034
3034
|
filterOption: (V, T) => T.label.toLowerCase().includes(V.toString())
|
|
3035
3035
|
}
|
|
@@ -3254,7 +3254,7 @@ const Ft = ({
|
|
|
3254
3254
|
ct
|
|
3255
3255
|
), { openAction: u } = l || {}, f = ne([]), { t: d } = he();
|
|
3256
3256
|
yt(t, () => ({
|
|
3257
|
-
openActionModal:
|
|
3257
|
+
openActionModal: I
|
|
3258
3258
|
}));
|
|
3259
3259
|
const [p, h] = b(!1), [m, y] = b(
|
|
3260
3260
|
{
|
|
@@ -3262,7 +3262,7 @@ const Ft = ({
|
|
|
3262
3262
|
}
|
|
3263
3263
|
);
|
|
3264
3264
|
async function g(T) {
|
|
3265
|
-
const { reportData: R, fields: C, values: _, context:
|
|
3265
|
+
const { reportData: R, fields: C, values: _, context: O = {} } = T, {
|
|
3266
3266
|
context: F,
|
|
3267
3267
|
model: N,
|
|
3268
3268
|
datas: A = {},
|
|
@@ -3284,7 +3284,7 @@ const Ft = ({
|
|
|
3284
3284
|
name: W,
|
|
3285
3285
|
datas: A,
|
|
3286
3286
|
ids: j,
|
|
3287
|
-
context: { ...
|
|
3287
|
+
context: { ...O, ...P }
|
|
3288
3288
|
});
|
|
3289
3289
|
c(!0), s.current = !0, r.current = setInterval(() => {
|
|
3290
3290
|
w(z);
|
|
@@ -3312,10 +3312,10 @@ const Ft = ({
|
|
|
3312
3312
|
fields: R,
|
|
3313
3313
|
values: C,
|
|
3314
3314
|
context: _,
|
|
3315
|
-
onRefreshParentValues:
|
|
3315
|
+
onRefreshParentValues: O
|
|
3316
3316
|
}) {
|
|
3317
3317
|
const { type: F } = T;
|
|
3318
|
-
if (f.current.push(
|
|
3318
|
+
if (f.current.push(O), F === "ir.actions.report.xml")
|
|
3319
3319
|
return await g({
|
|
3320
3320
|
reportData: T,
|
|
3321
3321
|
fields: R,
|
|
@@ -3339,77 +3339,77 @@ const Ft = ({
|
|
|
3339
3339
|
context: _ = {}
|
|
3340
3340
|
}) {
|
|
3341
3341
|
var W;
|
|
3342
|
-
let
|
|
3343
|
-
T.res_model || (
|
|
3342
|
+
let O = T;
|
|
3343
|
+
T.res_model || (O = (await k.getHandler().readObjects({
|
|
3344
3344
|
model: "ir.actions.act_window",
|
|
3345
3345
|
ids: [parseInt(T.id)],
|
|
3346
3346
|
context: _
|
|
3347
3347
|
}))[0]);
|
|
3348
|
-
const F = typeof (
|
|
3349
|
-
context:
|
|
3348
|
+
const F = typeof (O == null ? void 0 : O.context) == "string" ? Tt({
|
|
3349
|
+
context: O.context,
|
|
3350
3350
|
fields: R,
|
|
3351
3351
|
values: { ...C, ...o }
|
|
3352
|
-
}) :
|
|
3352
|
+
}) : O.context, N = {
|
|
3353
3353
|
..._,
|
|
3354
3354
|
...F
|
|
3355
3355
|
};
|
|
3356
3356
|
let A = [];
|
|
3357
|
-
if (
|
|
3358
|
-
domain:
|
|
3357
|
+
if (O.domain && (A = await k.getHandler().evalDomain({
|
|
3358
|
+
domain: O.domain,
|
|
3359
3359
|
values: Ft({
|
|
3360
3360
|
fields: R,
|
|
3361
3361
|
values: { ...C, ...o }
|
|
3362
3362
|
}),
|
|
3363
3363
|
fields: R,
|
|
3364
3364
|
context: N
|
|
3365
|
-
})),
|
|
3365
|
+
})), O.target === "new") {
|
|
3366
3366
|
const L = await k.getHandler().getView({
|
|
3367
|
-
model:
|
|
3367
|
+
model: O.res_model,
|
|
3368
3368
|
type: "form",
|
|
3369
|
-
id: ((W =
|
|
3369
|
+
id: ((W = O == null ? void 0 : O.view_id) == null ? void 0 : W[0]) || void 0,
|
|
3370
3370
|
context: N
|
|
3371
3371
|
});
|
|
3372
|
-
return
|
|
3372
|
+
return I({
|
|
3373
3373
|
domain: A,
|
|
3374
|
-
model:
|
|
3374
|
+
model: O.res_model,
|
|
3375
3375
|
formView: L,
|
|
3376
3376
|
context: N
|
|
3377
3377
|
}), {};
|
|
3378
3378
|
} else {
|
|
3379
3379
|
const { initialView: L, views: H } = await Rc({
|
|
3380
|
-
model:
|
|
3380
|
+
model: O.res_model,
|
|
3381
3381
|
context: N,
|
|
3382
|
-
view_mode:
|
|
3383
|
-
views:
|
|
3382
|
+
view_mode: O.view_mode,
|
|
3383
|
+
views: O.views
|
|
3384
3384
|
});
|
|
3385
3385
|
return u == null || u({
|
|
3386
3386
|
target: "current",
|
|
3387
3387
|
context: N,
|
|
3388
3388
|
domain: A,
|
|
3389
|
-
model:
|
|
3389
|
+
model: O.res_model,
|
|
3390
3390
|
views: H,
|
|
3391
|
-
title:
|
|
3391
|
+
title: O.name,
|
|
3392
3392
|
initialView: L,
|
|
3393
|
-
action_id:
|
|
3394
|
-
action_type:
|
|
3393
|
+
action_id: O.id,
|
|
3394
|
+
action_type: O.type
|
|
3395
3395
|
}), { closeParent: !0 };
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
|
-
function
|
|
3398
|
+
function I({
|
|
3399
3399
|
domain: T,
|
|
3400
3400
|
model: R,
|
|
3401
3401
|
formView: C,
|
|
3402
3402
|
context: _,
|
|
3403
|
-
actionData:
|
|
3403
|
+
actionData: O
|
|
3404
3404
|
}) {
|
|
3405
|
-
p ? v({ domain: T, model: R, formView: C, context: _, actionData:
|
|
3405
|
+
p ? v({ domain: T, model: R, formView: C, context: _, actionData: O }) : (y({ domain: T, model: R, context: _, formView: C, actionData: O }), h(!0));
|
|
3406
3406
|
}
|
|
3407
3407
|
async function v({
|
|
3408
3408
|
domain: T,
|
|
3409
3409
|
model: R,
|
|
3410
3410
|
formView: C,
|
|
3411
3411
|
context: _,
|
|
3412
|
-
actionData:
|
|
3412
|
+
actionData: O
|
|
3413
3413
|
}) {
|
|
3414
3414
|
y({
|
|
3415
3415
|
domain: void 0,
|
|
@@ -3417,7 +3417,7 @@ const Ft = ({
|
|
|
3417
3417
|
context: {},
|
|
3418
3418
|
formView: void 0,
|
|
3419
3419
|
actionData: void 0
|
|
3420
|
-
}), h(!1), await new Promise((F) => setTimeout(F, 300)), y({ domain: T, model: R, context: _, formView: C, actionData:
|
|
3420
|
+
}), h(!1), await new Promise((F) => setTimeout(F, 300)), y({ domain: T, model: R, context: _, formView: C, actionData: O }), h(!0);
|
|
3421
3421
|
}
|
|
3422
3422
|
async function V() {
|
|
3423
3423
|
Wr(f.current), f.current = [], h(!1), y({
|
|
@@ -3552,12 +3552,12 @@ function Ac(e, t) {
|
|
|
3552
3552
|
parentContext: w = {},
|
|
3553
3553
|
actionDomain: S,
|
|
3554
3554
|
visible: x = !0,
|
|
3555
|
-
rootForm:
|
|
3555
|
+
rootForm: I = !1,
|
|
3556
3556
|
defaultValues: v,
|
|
3557
3557
|
forcedValues: V = {},
|
|
3558
3558
|
parentWidth: T,
|
|
3559
3559
|
onMustRefreshParent: R
|
|
3560
|
-
} = e, { t: C } = he(), [_,
|
|
3560
|
+
} = e, { t: C } = he(), [_, O] = b(!1), [F, N] = b(), [A, W] = b(), [L] = ut.useForm(), [H, j] = b(), [P, z] = b(), Z = ee(jo), [te, U] = b(), [E, J] = b(!1), M = ne(), Q = ne({}), q = ne({}), me = ne(!1), ae = ne(!1), Y = ne(!1), pe = (T !== void 0 ? T : te) < _c, Ee = ee(Le), { activeId: Me, getPlainValues: De } = Ee || {}, ke = ne(!1), Ke = ee(
|
|
3561
3561
|
nt
|
|
3562
3562
|
), {
|
|
3563
3563
|
setFormIsSaving: ye = void 0,
|
|
@@ -3567,7 +3567,7 @@ function Ac(e, t) {
|
|
|
3567
3567
|
setAttachments: Se = void 0,
|
|
3568
3568
|
title: K = void 0,
|
|
3569
3569
|
setTitle: ve = void 0
|
|
3570
|
-
} = (
|
|
3570
|
+
} = (I ? Ke : {}) || {}, Fe = ee(
|
|
3571
3571
|
Kt
|
|
3572
3572
|
), { processAction: He, globalValues: Ne } = Fe || {};
|
|
3573
3573
|
yt(t, () => ({
|
|
@@ -3824,13 +3824,13 @@ function Ac(e, t) {
|
|
|
3824
3824
|
return ae.current = !1, ce == null || ce(!1), xe == null || xe(), { succeed: !0, id: ue() };
|
|
3825
3825
|
if (await qt())
|
|
3826
3826
|
return ae.current = !1, jr(C), { succeed: !1, id: ue() };
|
|
3827
|
-
|
|
3827
|
+
O(!0), ye == null || ye(!0);
|
|
3828
3828
|
try {
|
|
3829
3829
|
p === "api" ? await Cr($) : await mi($), d && (M.current = void 0, zt({ values: {}, fields: P, reset: !0 })), await Ge({ forceRefresh: !0 }), B = !0, En.success(C("savedRegisters"));
|
|
3830
3830
|
} catch (ie) {
|
|
3831
|
-
ae.current = !1,
|
|
3831
|
+
ae.current = !1, O(!1), ye == null || ye(!1), We == null || We(ie), En.error(C("errorWhileSavingForm")), N(ie != null && ie.message ? ie.message : ie);
|
|
3832
3832
|
} finally {
|
|
3833
|
-
ae.current = !1, ye == null || ye(!1),
|
|
3833
|
+
ae.current = !1, ye == null || ye(!1), O(!1);
|
|
3834
3834
|
}
|
|
3835
3835
|
return { succeed: B, id: ue() };
|
|
3836
3836
|
}, Sr = ({
|
|
@@ -4031,7 +4031,7 @@ function Ac(e, t) {
|
|
|
4031
4031
|
ke.current = !0, await Ge({ forceRefresh: !0 });
|
|
4032
4032
|
}
|
|
4033
4033
|
})) || {};
|
|
4034
|
-
!
|
|
4034
|
+
!I && oe && (re == null || re(ue(), G(), Te()));
|
|
4035
4035
|
}
|
|
4036
4036
|
function bi() {
|
|
4037
4037
|
Vn({ elementHasLostFocus: !0 });
|
|
@@ -4157,7 +4157,7 @@ const Ut = gt(Ac), Gt = (e) => {
|
|
|
4157
4157
|
isMenuAction: a = !1,
|
|
4158
4158
|
actionData: c,
|
|
4159
4159
|
...l
|
|
4160
|
-
} = e, { model: u } = l, { modalWidth: f } = In(), [d, p] = b(o), [h, m] = b(!1), [y, g] = b(), { action_id: w, res_id: S, action_type: x, view_id:
|
|
4160
|
+
} = e, { model: u } = l, { modalWidth: f } = In(), [d, p] = b(o), [h, m] = b(!1), [y, g] = b(), { action_id: w, res_id: S, action_type: x, view_id: I } = c || {};
|
|
4161
4161
|
le(() => {
|
|
4162
4162
|
a && v();
|
|
4163
4163
|
}, [c, a]);
|
|
@@ -4165,7 +4165,7 @@ const Ut = gt(Ac), Gt = (e) => {
|
|
|
4165
4165
|
const C = await k.getHandler().isShortcutFavorite({
|
|
4166
4166
|
action_id: w,
|
|
4167
4167
|
action_type: x,
|
|
4168
|
-
view_id:
|
|
4168
|
+
view_id: I,
|
|
4169
4169
|
res_id: S || !1
|
|
4170
4170
|
});
|
|
4171
4171
|
m(C !== !1), C !== !1 && g(C);
|
|
@@ -4176,10 +4176,10 @@ const Ut = gt(Ac), Gt = (e) => {
|
|
|
4176
4176
|
shortcut_id: y
|
|
4177
4177
|
});
|
|
4178
4178
|
else {
|
|
4179
|
-
const { action_id: C, res_id: _, action_type:
|
|
4179
|
+
const { action_id: C, res_id: _, action_type: O, view_id: F } = c;
|
|
4180
4180
|
await k.getHandler().addFavourite({
|
|
4181
4181
|
action_id: C,
|
|
4182
|
-
action_type:
|
|
4182
|
+
action_type: O,
|
|
4183
4183
|
view_id: F,
|
|
4184
4184
|
res_id: _ || !1
|
|
4185
4185
|
});
|
|
@@ -4222,7 +4222,7 @@ const Ut = gt(Ac), Gt = (e) => {
|
|
|
4222
4222
|
parentWidth: R,
|
|
4223
4223
|
...l
|
|
4224
4224
|
},
|
|
4225
|
-
`${u}-${n}-${w}-${S}-${x}-${
|
|
4225
|
+
`${u}-${n}-${w}-${S}-${x}-${I}-${o}`
|
|
4226
4226
|
)
|
|
4227
4227
|
}
|
|
4228
4228
|
) });
|
|
@@ -4596,36 +4596,36 @@ function Ko(e) {
|
|
|
4596
4596
|
searchError: d,
|
|
4597
4597
|
searchValues: p,
|
|
4598
4598
|
showLimitOptions: h = !0
|
|
4599
|
-
} = e, [m, y] = b(), [g, w] = b(), [S, x] = b(!1),
|
|
4599
|
+
} = e, [m, y] = b(), [g, w] = b(), [S, x] = b(!1), I = ne(), { token: v } = nl(), [V] = ut.useForm();
|
|
4600
4600
|
le(() => {
|
|
4601
4601
|
V.setFieldsValue(p);
|
|
4602
4602
|
}, [p]);
|
|
4603
4603
|
const T = () => {
|
|
4604
4604
|
if (!g)
|
|
4605
4605
|
return;
|
|
4606
|
-
const _ = S ? g : m,
|
|
4607
|
-
return
|
|
4606
|
+
const _ = S ? g : m, O = _ == null ? void 0 : _.rows;
|
|
4607
|
+
return O == null ? void 0 : O.map((F, N) => /* @__PURE__ */ i(Ae, { children: F.map((A, W) => /* @__PURE__ */ i(ge, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(Uc, { field: A }) }, W)) }, N));
|
|
4608
4608
|
};
|
|
4609
4609
|
wt(() => {
|
|
4610
|
-
x(!1),
|
|
4610
|
+
x(!1), I.current = new Hi(n, t), I.current.parse(), y(I.current._simpleSearchContainer), w(I.current._advancedSearchContainer);
|
|
4611
4611
|
}, [t, n]);
|
|
4612
4612
|
const R = T(), C = (_) => {
|
|
4613
4613
|
var A;
|
|
4614
|
-
const { limit:
|
|
4614
|
+
const { limit: O, offset: F } = _;
|
|
4615
4615
|
delete _.offset, delete _.limit;
|
|
4616
4616
|
const N = qc(
|
|
4617
4617
|
_,
|
|
4618
|
-
(A =
|
|
4618
|
+
(A = I.current) == null ? void 0 : A._advancedSearchContainer
|
|
4619
4619
|
);
|
|
4620
|
-
r({ params: N, offset: F, limit:
|
|
4620
|
+
r({ params: N, offset: F, limit: O, searchValues: _ });
|
|
4621
4621
|
};
|
|
4622
4622
|
return /* @__PURE__ */ i(
|
|
4623
4623
|
ur,
|
|
4624
4624
|
{
|
|
4625
4625
|
bounds: !0,
|
|
4626
4626
|
onResize: (_) => {
|
|
4627
|
-
var
|
|
4628
|
-
f == null || f((
|
|
4627
|
+
var O;
|
|
4628
|
+
f == null || f((O = _.bounds) == null ? void 0 : O.height);
|
|
4629
4629
|
},
|
|
4630
4630
|
children: ({ measureRef: _ }) => /* @__PURE__ */ i("div", { ref: _, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
|
|
4631
4631
|
/* @__PURE__ */ D(
|
|
@@ -4873,14 +4873,14 @@ const al = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Go,
|
|
|
4873
4873
|
context: o
|
|
4874
4874
|
});
|
|
4875
4875
|
s(x);
|
|
4876
|
-
const
|
|
4876
|
+
const I = dl(x);
|
|
4877
4877
|
let v = {};
|
|
4878
|
-
if (
|
|
4878
|
+
if (I.length > 0 && (v = { ...(V = await m({
|
|
4879
4879
|
model: n,
|
|
4880
4880
|
ids: [t],
|
|
4881
|
-
fieldsToRetrieve:
|
|
4881
|
+
fieldsToRetrieve: I,
|
|
4882
4882
|
context: o
|
|
4883
|
-
})) == null ? void 0 : V[0] }), v = { ...Dt(v,
|
|
4883
|
+
})) == null ? void 0 : V[0] }), v = { ...Dt(v, I), active_id: t }, c(v), !(!x || !x.toolbar))
|
|
4884
4884
|
return {
|
|
4885
4885
|
actionItems: x.toolbar.action,
|
|
4886
4886
|
relateItems: x.toolbar.relate,
|
|
@@ -4889,12 +4889,12 @@ const al = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Go,
|
|
|
4889
4889
|
}, [o, p, t, n, m]);
|
|
4890
4890
|
if (!t)
|
|
4891
4891
|
return null;
|
|
4892
|
-
function S({ item: x, type:
|
|
4892
|
+
function S({ item: x, type: I }) {
|
|
4893
4893
|
const v = {
|
|
4894
4894
|
values: a,
|
|
4895
4895
|
fields: r.fields
|
|
4896
4896
|
};
|
|
4897
|
-
switch (
|
|
4897
|
+
switch (I) {
|
|
4898
4898
|
case "action":
|
|
4899
4899
|
d == null || d({
|
|
4900
4900
|
actionData: x,
|
|
@@ -5199,13 +5199,13 @@ const al = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Go,
|
|
|
5199
5199
|
sorter: w,
|
|
5200
5200
|
onFetchChildrenForRecord: S,
|
|
5201
5201
|
childField: x,
|
|
5202
|
-
rootTree:
|
|
5202
|
+
rootTree: I = !1,
|
|
5203
5203
|
context: v,
|
|
5204
5204
|
readonly: V,
|
|
5205
5205
|
onSelectAllRecords: T
|
|
5206
|
-
} = e, R = ne(null), [C, _] = b([]),
|
|
5206
|
+
} = e, R = ne(null), [C, _] = b([]), O = ne(!1), [F, N] = b(), { t: A } = he(), W = ne(o), L = ee(
|
|
5207
5207
|
nt
|
|
5208
|
-
), { title: H = void 0, setTitle: j = void 0 } = (
|
|
5208
|
+
), { title: H = void 0, setTitle: j = void 0 } = (I ? L : {}) || {}, P = Ie(() => {
|
|
5209
5209
|
if (F)
|
|
5210
5210
|
return Fo(
|
|
5211
5211
|
F,
|
|
@@ -5226,7 +5226,7 @@ const al = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Go,
|
|
|
5226
5226
|
}, [s, H]), le(() => {
|
|
5227
5227
|
if (!F)
|
|
5228
5228
|
return;
|
|
5229
|
-
|
|
5229
|
+
O.current = !1;
|
|
5230
5230
|
const q = mr(F, a);
|
|
5231
5231
|
_(q);
|
|
5232
5232
|
}, [a]), le(() => {
|
|
@@ -5347,12 +5347,12 @@ const Jo = (e) => {
|
|
|
5347
5347
|
resultsActionView: w,
|
|
5348
5348
|
domain: S,
|
|
5349
5349
|
currentId: x,
|
|
5350
|
-
limit:
|
|
5350
|
+
limit: I,
|
|
5351
5351
|
setLimit: v,
|
|
5352
5352
|
searchParams: V = [],
|
|
5353
5353
|
setSearchValues: T,
|
|
5354
5354
|
clearSelection: R
|
|
5355
|
-
} = e, [C, _] = b(!1), [
|
|
5355
|
+
} = e, [C, _] = b(!1), [O, F] = b(!1), [N, A] = b(), [W, L] = b(1), [H, j] = b(0), [P, z] = b(), [Z, te] = b([]), [U, E] = b(void 0), [J, M] = b(void 0), Q = ne(I || Ot), q = ne([]), me = X(
|
|
5356
5356
|
(ce) => {
|
|
5357
5357
|
g == null || g([...ce]), te([...ce]);
|
|
5358
5358
|
},
|
|
@@ -5502,18 +5502,18 @@ const Jo = (e) => {
|
|
|
5502
5502
|
]
|
|
5503
5503
|
), De = X(
|
|
5504
5504
|
(ce) => {
|
|
5505
|
-
_(!0), L(ce), j((ce - 1) *
|
|
5505
|
+
_(!0), L(ce), j((ce - 1) * I);
|
|
5506
5506
|
},
|
|
5507
|
-
[_,
|
|
5507
|
+
[_, I, j, L]
|
|
5508
5508
|
), ke = X(() => {
|
|
5509
|
-
C || (n == null || n(void 0), r == null || r([]), T == null || T({}), A(void 0), j(0), L(1), v == null || v(
|
|
5509
|
+
C || (n == null || n(void 0), r == null || r([]), T == null || T({}), A(void 0), j(0), L(1), v == null || v(I || Ot));
|
|
5510
5510
|
}, [
|
|
5511
5511
|
C,
|
|
5512
5512
|
n,
|
|
5513
5513
|
r,
|
|
5514
5514
|
T,
|
|
5515
5515
|
v,
|
|
5516
|
-
|
|
5516
|
+
I
|
|
5517
5517
|
]), Ke = X(
|
|
5518
5518
|
async (ce) => {
|
|
5519
5519
|
const Oe = ce[(d == null ? void 0 : d.field_parent) || "child_id"], Re = await k.getHandler().readObjects({
|
|
@@ -5536,7 +5536,7 @@ const Jo = (e) => {
|
|
|
5536
5536
|
clear: ke,
|
|
5537
5537
|
fetchResults: pe,
|
|
5538
5538
|
tableRefreshing: C,
|
|
5539
|
-
searchFilterLoading:
|
|
5539
|
+
searchFilterLoading: O,
|
|
5540
5540
|
searchError: N,
|
|
5541
5541
|
page: W,
|
|
5542
5542
|
offset: H,
|
|
@@ -5565,7 +5565,7 @@ function Vl(e, t) {
|
|
|
5565
5565
|
rootTree: f = !1,
|
|
5566
5566
|
parentContext: d = {},
|
|
5567
5567
|
onChangeSelectedRowKeys: p
|
|
5568
|
-
} = e, [h, m] = b(!1), [y, g] = b(!1), w = ne(!1), S = ne(null), [x,
|
|
5568
|
+
} = e, [h, m] = b(!1), [y, g] = b(!1), w = ne(!1), S = ne(null), [x, I] = b(), [v, V] = b(), [T, R] = b(), [C, _] = b(), [O, F] = b(200), N = ne(), { height: A } = In(), W = ee(
|
|
5569
5569
|
Kt
|
|
5570
5570
|
), { processAction: L } = W || {}, H = ee(
|
|
5571
5571
|
nt
|
|
@@ -5657,7 +5657,7 @@ function Vl(e, t) {
|
|
|
5657
5657
|
m(!1);
|
|
5658
5658
|
}
|
|
5659
5659
|
}, Te = async () => {
|
|
5660
|
-
|
|
5660
|
+
I(n);
|
|
5661
5661
|
let $e = o;
|
|
5662
5662
|
o || ($e = await k.getHandler().getView({
|
|
5663
5663
|
model: n,
|
|
@@ -5721,7 +5721,7 @@ function Vl(e, t) {
|
|
|
5721
5721
|
), lt = X(async () => {
|
|
5722
5722
|
const $e = await G();
|
|
5723
5723
|
U == null || U($e.map((Ge) => ({ id: Ge }))), p == null || p($e);
|
|
5724
|
-
}, [G, p, U]), dt = Ie(() => v != null && v.isExpandable ? A - 160 : A - (
|
|
5724
|
+
}, [G, p, U]), dt = Ie(() => v != null && v.isExpandable ? A - 160 : A - (O + 240), [A, O, v == null ? void 0 : v.isExpandable]), Ue = Ie(
|
|
5725
5725
|
() => te == null ? void 0 : te.map(($e) => $e.id),
|
|
5726
5726
|
[te]
|
|
5727
5727
|
), mt = X(() => !v || !T ? null : /* @__PURE__ */ D(se, { children: [
|
|
@@ -5841,7 +5841,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5841
5841
|
const { id: T } = V;
|
|
5842
5842
|
w([T]);
|
|
5843
5843
|
};
|
|
5844
|
-
function
|
|
5844
|
+
function I() {
|
|
5845
5845
|
if (h.length === 0) {
|
|
5846
5846
|
S();
|
|
5847
5847
|
return;
|
|
@@ -5880,7 +5880,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5880
5880
|
disabled: y,
|
|
5881
5881
|
icon: y ? /* @__PURE__ */ i(ft, {}) : /* @__PURE__ */ i(Cn, {}),
|
|
5882
5882
|
onClick: () => {
|
|
5883
|
-
|
|
5883
|
+
I();
|
|
5884
5884
|
},
|
|
5885
5885
|
type: "primary",
|
|
5886
5886
|
children: p("ok")
|
|
@@ -5938,7 +5938,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5938
5938
|
context: c,
|
|
5939
5939
|
id: l,
|
|
5940
5940
|
domain: u
|
|
5941
|
-
} = o, f = r && !a ? { backgroundColor: Xo.colorPrimaryBg } : void 0, [d, p] = b(!1), [h, m] = b(!1), [y, g] = b(!1), [w, S] = b(), x = ne(!1), [
|
|
5941
|
+
} = o, f = r && !a ? { backgroundColor: Xo.colorPrimaryBg } : void 0, [d, p] = b(!1), [h, m] = b(!1), [y, g] = b(!1), [w, S] = b(), x = ne(!1), [I, v] = b(""), V = ne(), T = ee(Le), { domain: R, getValues: C, getFields: _, getContext: O, elementHasLostFocus: F } = T || {}, N = ne([]), [A, W] = b([]), L = t && t[0] || void 0, H = t && t[1] || "";
|
|
5942
5942
|
le(() => {
|
|
5943
5943
|
!Array.isArray(t) && t && te(t);
|
|
5944
5944
|
}, [t]), le(() => {
|
|
@@ -5949,7 +5949,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5949
5949
|
}, P = (M) => {
|
|
5950
5950
|
V.current = M.target.value, j([void 0, ""]);
|
|
5951
5951
|
}, z = async () => {
|
|
5952
|
-
if (!y &&
|
|
5952
|
+
if (!y && I !== H) {
|
|
5953
5953
|
if (await new Promise((M) => setTimeout(M, 100)), x.current) {
|
|
5954
5954
|
j([void 0, ""]);
|
|
5955
5955
|
return;
|
|
@@ -5962,7 +5962,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5962
5962
|
const M = await k.getHandler().nameSearch({
|
|
5963
5963
|
model: s,
|
|
5964
5964
|
payload: V.current,
|
|
5965
|
-
context: { ...
|
|
5965
|
+
context: { ...O == null ? void 0 : O(), ...c }
|
|
5966
5966
|
});
|
|
5967
5967
|
M.length === 1 ? (V.current = void 0, j(M[0])) : Z(V.current);
|
|
5968
5968
|
}
|
|
@@ -5977,7 +5977,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5977
5977
|
const Q = await k.getHandler().searchAllIds({
|
|
5978
5978
|
params: N.current,
|
|
5979
5979
|
model: s,
|
|
5980
|
-
context: { ...
|
|
5980
|
+
context: { ...O == null ? void 0 : O(), ...c },
|
|
5981
5981
|
totalItems: 2
|
|
5982
5982
|
});
|
|
5983
5983
|
Q.length === 1 ? te(Q[0]) : (S(M), p(!0));
|
|
@@ -5991,7 +5991,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
5991
5991
|
action: "name_get",
|
|
5992
5992
|
payload: [M],
|
|
5993
5993
|
model: s,
|
|
5994
|
-
context: { ...
|
|
5994
|
+
context: { ...O == null ? void 0 : O(), ...c }
|
|
5995
5995
|
});
|
|
5996
5996
|
j([M, Q[0][1]]);
|
|
5997
5997
|
} catch (Q) {
|
|
@@ -6008,7 +6008,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6008
6008
|
values: C()
|
|
6009
6009
|
}),
|
|
6010
6010
|
fields: _(),
|
|
6011
|
-
context:
|
|
6011
|
+
context: O()
|
|
6012
6012
|
})), R && R.length > 0 && (N.current = N.current.concat(
|
|
6013
6013
|
er({
|
|
6014
6014
|
domain: R,
|
|
@@ -6024,7 +6024,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6024
6024
|
r && !a ? kl : it,
|
|
6025
6025
|
{
|
|
6026
6026
|
type: "text",
|
|
6027
|
-
value:
|
|
6027
|
+
value: I,
|
|
6028
6028
|
disabled: a,
|
|
6029
6029
|
onChange: P,
|
|
6030
6030
|
style: {
|
|
@@ -6039,7 +6039,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6039
6039
|
{
|
|
6040
6040
|
id: L,
|
|
6041
6041
|
model: s,
|
|
6042
|
-
context: { ...
|
|
6042
|
+
context: { ...O == null ? void 0 : O(), ...c }
|
|
6043
6043
|
}
|
|
6044
6044
|
)
|
|
6045
6045
|
}
|
|
@@ -6048,7 +6048,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6048
6048
|
Pe,
|
|
6049
6049
|
{
|
|
6050
6050
|
icon: /* @__PURE__ */ i(tr, {}),
|
|
6051
|
-
disabled: L === void 0 || H === "" ||
|
|
6051
|
+
disabled: L === void 0 || H === "" || I === void 0,
|
|
6052
6052
|
onClick: () => {
|
|
6053
6053
|
m(!0);
|
|
6054
6054
|
},
|
|
@@ -6073,7 +6073,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6073
6073
|
{
|
|
6074
6074
|
model: s,
|
|
6075
6075
|
domain: A,
|
|
6076
|
-
context: { ...
|
|
6076
|
+
context: { ...O == null ? void 0 : O(), ...c },
|
|
6077
6077
|
visible: d,
|
|
6078
6078
|
nameSearch: L ? void 0 : w,
|
|
6079
6079
|
onSelectValues: async (M) => {
|
|
@@ -6088,7 +6088,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6088
6088
|
Gt,
|
|
6089
6089
|
{
|
|
6090
6090
|
model: s,
|
|
6091
|
-
parentContext: { ...
|
|
6091
|
+
parentContext: { ...O == null ? void 0 : O(), ...c },
|
|
6092
6092
|
id: t && t[0],
|
|
6093
6093
|
visible: h,
|
|
6094
6094
|
onSubmitSucceed: (M) => {
|
|
@@ -6262,7 +6262,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6262
6262
|
}
|
|
6263
6263
|
);
|
|
6264
6264
|
}
|
|
6265
|
-
function
|
|
6265
|
+
function I() {
|
|
6266
6266
|
let V = "_";
|
|
6267
6267
|
return c === 0 ? V = "_" : V = (l + 1).toString(), /* @__PURE__ */ D("span", { className: "pl-1 pr-1", children: [
|
|
6268
6268
|
"(",
|
|
@@ -6283,7 +6283,7 @@ const Qo = gt(Vl), { error: _l } = et, Pt = (e) => {
|
|
|
6283
6283
|
onClick: u
|
|
6284
6284
|
}
|
|
6285
6285
|
),
|
|
6286
|
-
|
|
6286
|
+
I(),
|
|
6287
6287
|
/* @__PURE__ */ i(
|
|
6288
6288
|
Qe,
|
|
6289
6289
|
{
|
|
@@ -6355,7 +6355,7 @@ const Bl = (e) => {
|
|
|
6355
6355
|
getContext: m,
|
|
6356
6356
|
domain: y,
|
|
6357
6357
|
fetchValues: g
|
|
6358
|
-
} = f || {}, { t: w } = he(), [S, x] = b(!1), [
|
|
6358
|
+
} = f || {}, { t: w } = he(), [S, x] = b(!1), [I, v] = b(!1), [V, T] = b(), [R, C] = b(!1), [_, O] = b(!1), [F, N] = b(), [A, W] = b([]), [L, H] = b(!1), j = ne([]), [P, z] = b(), Z = ne(), [te, U] = b(void 0), {
|
|
6359
6359
|
readOnly: E,
|
|
6360
6360
|
relation: J,
|
|
6361
6361
|
context: M,
|
|
@@ -6487,8 +6487,8 @@ const Bl = (e) => {
|
|
|
6487
6487
|
}) : (H(!0), N({ defaultValues: fe }), C(!0));
|
|
6488
6488
|
}, K = async () => {
|
|
6489
6489
|
a === "form" ? Oe(() => {
|
|
6490
|
-
|
|
6491
|
-
}) :
|
|
6490
|
+
O(!0);
|
|
6491
|
+
}) : O(!0);
|
|
6492
6492
|
}, ve = async () => {
|
|
6493
6493
|
v(!0), x(!1), T(void 0);
|
|
6494
6494
|
try {
|
|
@@ -6630,7 +6630,7 @@ const Bl = (e) => {
|
|
|
6630
6630
|
limit: ae.length,
|
|
6631
6631
|
treeView: r.get("tree"),
|
|
6632
6632
|
results: G,
|
|
6633
|
-
loading:
|
|
6633
|
+
loading: I,
|
|
6634
6634
|
onRowClicked: ((Ve = r.get("form")) == null ? void 0 : Ve.fields) !== void 0 ? Ne : void 0,
|
|
6635
6635
|
showPagination: !1,
|
|
6636
6636
|
selectedRowKeys: A,
|
|
@@ -6660,7 +6660,7 @@ const Bl = (e) => {
|
|
|
6660
6660
|
if (V)
|
|
6661
6661
|
return /* @__PURE__ */ i(Xe, { className: "mt-10", message: V, type: "error", banner: !0 });
|
|
6662
6662
|
const ue = L;
|
|
6663
|
-
return
|
|
6663
|
+
return I ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(se, { children: [
|
|
6664
6664
|
/* @__PURE__ */ i(
|
|
6665
6665
|
ri,
|
|
6666
6666
|
{
|
|
@@ -6713,10 +6713,10 @@ const Bl = (e) => {
|
|
|
6713
6713
|
context: { ...m == null ? void 0 : m(), ...M },
|
|
6714
6714
|
visible: _,
|
|
6715
6715
|
onSelectValues: async (G) => {
|
|
6716
|
-
|
|
6716
|
+
O(!1), re(G);
|
|
6717
6717
|
},
|
|
6718
6718
|
onCloseModal: () => {
|
|
6719
|
-
|
|
6719
|
+
O(!1);
|
|
6720
6720
|
}
|
|
6721
6721
|
}
|
|
6722
6722
|
)
|
|
@@ -7009,7 +7009,7 @@ const ql = ({
|
|
|
7009
7009
|
s(C), y || p(!1);
|
|
7010
7010
|
},
|
|
7011
7011
|
[y, r, s]
|
|
7012
|
-
),
|
|
7012
|
+
), I = st(
|
|
7013
7013
|
async (v) => {
|
|
7014
7014
|
const { id: V } = v;
|
|
7015
7015
|
let T = r;
|
|
@@ -7030,7 +7030,7 @@ const ql = ({
|
|
|
7030
7030
|
createItem: w,
|
|
7031
7031
|
onCancelFormModal: S,
|
|
7032
7032
|
onFormModalSubmitSucceed: x,
|
|
7033
|
-
openItemInFormModal:
|
|
7033
|
+
openItemInFormModal: I
|
|
7034
7034
|
};
|
|
7035
7035
|
}, zl = ({
|
|
7036
7036
|
currentView: e,
|
|
@@ -7201,7 +7201,7 @@ const ql = ({
|
|
|
7201
7201
|
dataForHash: y,
|
|
7202
7202
|
aggregates: g
|
|
7203
7203
|
}) => {
|
|
7204
|
-
const w = ne(), S = l || w, x = ne({}),
|
|
7204
|
+
const w = ne(), S = l || w, x = ne({}), I = ne({}), v = ne(), V = ne(e);
|
|
7205
7205
|
wt(() => {
|
|
7206
7206
|
var A, W;
|
|
7207
7207
|
if (V.current = e, v.current === void 0) {
|
|
@@ -7229,21 +7229,18 @@ const ql = ({
|
|
|
7229
7229
|
const Q = E.find((me) => me.id === M);
|
|
7230
7230
|
return Q || ((q = L.find((me) => me.id === M)) == null ? void 0 : q.treeValues);
|
|
7231
7231
|
});
|
|
7232
|
-
return x.current = { ...x.current, ...te },
|
|
7232
|
+
return x.current = { ...x.current, ...te }, I.current = { ...I.current, ...U }, J;
|
|
7233
7233
|
},
|
|
7234
7234
|
[a, r]
|
|
7235
7235
|
), _ = X((A) => {
|
|
7236
7236
|
var W, L, H, j;
|
|
7237
7237
|
if (x.current[(L = (W = A.node) == null ? void 0 : W.data) == null ? void 0 : L.id])
|
|
7238
7238
|
return { color: x.current[(j = (H = A.node) == null ? void 0 : H.data) == null ? void 0 : j.id] };
|
|
7239
|
-
}, []), { loading:
|
|
7239
|
+
}, []), { loading: O, getColumnState: F, updateColumnState: N } = ed({
|
|
7240
7240
|
...y,
|
|
7241
7241
|
model: u
|
|
7242
7242
|
});
|
|
7243
|
-
return
|
|
7244
|
-
loading: I,
|
|
7245
|
-
state: F()
|
|
7246
|
-
}), I ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
|
|
7243
|
+
return O ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
|
|
7247
7244
|
Rs,
|
|
7248
7245
|
{
|
|
7249
7246
|
ref: S,
|
|
@@ -7267,7 +7264,7 @@ const ql = ({
|
|
|
7267
7264
|
statusComponent: (A) => /* @__PURE__ */ i(no, { color: A }),
|
|
7268
7265
|
onRowStatus: (A) => {
|
|
7269
7266
|
var W;
|
|
7270
|
-
return (W =
|
|
7267
|
+
return (W = I.current) == null ? void 0 : W[A.id];
|
|
7271
7268
|
}
|
|
7272
7269
|
}
|
|
7273
7270
|
);
|
|
@@ -7345,14 +7342,14 @@ const ql = ({
|
|
|
7345
7342
|
} = r, w = ee(Le), {
|
|
7346
7343
|
activeId: S,
|
|
7347
7344
|
getContext: x,
|
|
7348
|
-
fetchValues:
|
|
7345
|
+
fetchValues: I
|
|
7349
7346
|
} = w || {}, v = s.size > 1, V = ((Re = s.get("form")) == null ? void 0 : Re.fields) !== void 0, T = Ie(() => ({ ...x == null ? void 0 : x(), ...m }), [x, m]), R = Hl({
|
|
7350
7347
|
widgetDomain: y,
|
|
7351
7348
|
fieldName: g
|
|
7352
7349
|
}), {
|
|
7353
7350
|
treeOoui: C,
|
|
7354
7351
|
onTreeFetchRows: _,
|
|
7355
|
-
selectedRowKeys:
|
|
7352
|
+
selectedRowKeys: O,
|
|
7356
7353
|
setSelectedRowKeys: F,
|
|
7357
7354
|
onChangeFirstVisibleRowIndex: N,
|
|
7358
7355
|
onGetFirstVisibileRowIndex: A,
|
|
@@ -7367,7 +7364,7 @@ const ql = ({
|
|
|
7367
7364
|
ooui: C,
|
|
7368
7365
|
model: h,
|
|
7369
7366
|
items: c,
|
|
7370
|
-
selectedRowKeys:
|
|
7367
|
+
selectedRowKeys: O
|
|
7371
7368
|
}), P = Ie(() => {
|
|
7372
7369
|
const { title: Se } = s.get(l) || {};
|
|
7373
7370
|
return Se || r.label;
|
|
@@ -7430,7 +7427,7 @@ const ql = ({
|
|
|
7430
7427
|
items: c,
|
|
7431
7428
|
triggerChange: Z,
|
|
7432
7429
|
setFormHasChanges: J,
|
|
7433
|
-
selectedRowKeys:
|
|
7430
|
+
selectedRowKeys: O,
|
|
7434
7431
|
setSelectedRowKeys: F
|
|
7435
7432
|
}), Ke = () => {
|
|
7436
7433
|
const Se = Array.from(s.keys()), K = Se[(Se.indexOf(l) + 1) % Se.length];
|
|
@@ -7477,7 +7474,7 @@ const ql = ({
|
|
|
7477
7474
|
onPreviousItem: ce,
|
|
7478
7475
|
onNextItem: Oe,
|
|
7479
7476
|
onSearchItem: De,
|
|
7480
|
-
selectedRowKeys:
|
|
7477
|
+
selectedRowKeys: O,
|
|
7481
7478
|
showCreateButton: V,
|
|
7482
7479
|
showToggleButton: v
|
|
7483
7480
|
}
|
|
@@ -7534,7 +7531,7 @@ const ql = ({
|
|
|
7534
7531
|
readOnly: p,
|
|
7535
7532
|
mustClearAfterSave: q,
|
|
7536
7533
|
onMustRefreshParent: () => {
|
|
7537
|
-
|
|
7534
|
+
I == null || I({ forceRefresh: !0 });
|
|
7538
7535
|
}
|
|
7539
7536
|
}
|
|
7540
7537
|
),
|
|
@@ -7833,7 +7830,7 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
7833
7830
|
}
|
|
7834
7831
|
let w = o;
|
|
7835
7832
|
g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
|
|
7836
|
-
["id", "in", n == null ? void 0 : n.map((
|
|
7833
|
+
["id", "in", n == null ? void 0 : n.map((I) => I.id)]
|
|
7837
7834
|
]);
|
|
7838
7835
|
const { datas: S } = await k.getHandler().exportData({
|
|
7839
7836
|
model: e,
|
|
@@ -7846,7 +7843,7 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
7846
7843
|
context: t,
|
|
7847
7844
|
format: g.exportType
|
|
7848
7845
|
});
|
|
7849
|
-
s(), await new Promise((
|
|
7846
|
+
s(), await new Promise((I) => setTimeout(I, 200));
|
|
7850
7847
|
const x = await Nt(S);
|
|
7851
7848
|
On(S, x.mime);
|
|
7852
7849
|
},
|
|
@@ -7860,18 +7857,18 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
7860
7857
|
return a.current["/"] = g, zr({ fields: g });
|
|
7861
7858
|
}, [e, t, a]), d = X(
|
|
7862
7859
|
async (g) => {
|
|
7863
|
-
const S = zn(g, a.current)[qn(g)], x = S.relation,
|
|
7860
|
+
const S = zn(g, a.current)[qn(g)], x = S.relation, I = await k.getHandler().getFields({
|
|
7864
7861
|
model: x,
|
|
7865
7862
|
context: t,
|
|
7866
7863
|
fields: []
|
|
7867
7864
|
});
|
|
7868
|
-
for (const [v, V] of Object.entries(
|
|
7869
|
-
|
|
7865
|
+
for (const [v, V] of Object.entries(I))
|
|
7866
|
+
I[v].string = vd({
|
|
7870
7867
|
parentTitle: S.string,
|
|
7871
7868
|
title: V.string
|
|
7872
7869
|
});
|
|
7873
|
-
return a.current[g] =
|
|
7874
|
-
fields:
|
|
7870
|
+
return a.current[g] = I, zr({
|
|
7871
|
+
fields: I,
|
|
7875
7872
|
parentKey: g
|
|
7876
7873
|
});
|
|
7877
7874
|
},
|
|
@@ -7885,13 +7882,13 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
7885
7882
|
return {
|
|
7886
7883
|
predefinedExports: g.map((x) => ({
|
|
7887
7884
|
...x,
|
|
7888
|
-
fields: x.fields.map((
|
|
7889
|
-
const v = qn(
|
|
7885
|
+
fields: x.fields.map((I) => {
|
|
7886
|
+
const v = qn(I.key), T = zn(I.key, a.current)[v];
|
|
7890
7887
|
return T ? {
|
|
7891
|
-
key:
|
|
7888
|
+
key: I.key,
|
|
7892
7889
|
title: T.string
|
|
7893
7890
|
} : {
|
|
7894
|
-
key:
|
|
7891
|
+
key: I.key
|
|
7895
7892
|
};
|
|
7896
7893
|
})
|
|
7897
7894
|
})),
|
|
@@ -7930,10 +7927,10 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
7930
7927
|
context: t
|
|
7931
7928
|
});
|
|
7932
7929
|
return await Promise.all(
|
|
7933
|
-
g.fields.map(async (
|
|
7930
|
+
g.fields.map(async (I) => await k.getHandler().create({
|
|
7934
7931
|
model: "ir.exports.line",
|
|
7935
7932
|
values: {
|
|
7936
|
-
name:
|
|
7933
|
+
name: I.key,
|
|
7937
7934
|
export_id: x
|
|
7938
7935
|
},
|
|
7939
7936
|
fields: S,
|
|
@@ -8171,8 +8168,8 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
8171
8168
|
o == null || o(x);
|
|
8172
8169
|
};
|
|
8173
8170
|
async function y() {
|
|
8174
|
-
const x = await Nt(n),
|
|
8175
|
-
v.href =
|
|
8171
|
+
const x = await Nt(n), I = `data:${x == null ? void 0 : x.mime};base64,${n}`, v = document.createElement("a"), V = d(a), T = d("name");
|
|
8172
|
+
v.href = I, v.download = V || T, v.click();
|
|
8176
8173
|
}
|
|
8177
8174
|
async function g() {
|
|
8178
8175
|
const x = await Nt(n);
|
|
@@ -8180,8 +8177,8 @@ const { useToken: md } = je, { TextArea: Gn } = it, pd = (e) => {
|
|
|
8180
8177
|
}
|
|
8181
8178
|
async function w(x) {
|
|
8182
8179
|
x.stopPropagation(), x.preventDefault();
|
|
8183
|
-
const
|
|
8184
|
-
m(v), a && f(a,
|
|
8180
|
+
const I = x.target.files[0], v = await Ro(I);
|
|
8181
|
+
m(v), a && f(a, I.name);
|
|
8185
8182
|
}
|
|
8186
8183
|
function S() {
|
|
8187
8184
|
f(a, void 0), m(void 0);
|
|
@@ -8630,7 +8627,7 @@ function $d({ toolbar: e }) {
|
|
|
8630
8627
|
setResults: w,
|
|
8631
8628
|
formIsLoading: S,
|
|
8632
8629
|
attachments: x,
|
|
8633
|
-
formRef:
|
|
8630
|
+
formRef: I,
|
|
8634
8631
|
setFormHasChanges: v,
|
|
8635
8632
|
previousView: V,
|
|
8636
8633
|
setPreviousView: T,
|
|
@@ -8667,7 +8664,7 @@ function $d({ toolbar: e }) {
|
|
|
8667
8664
|
);
|
|
8668
8665
|
const { t: C } = he(), _ = ee(
|
|
8669
8666
|
Kt
|
|
8670
|
-
), { processAction:
|
|
8667
|
+
), { processAction: O } = _ || {}, F = ee(
|
|
8671
8668
|
ct
|
|
8672
8669
|
), { openRelate: N, openDefaultActionForModel: A } = F || {};
|
|
8673
8670
|
function W(E) {
|
|
@@ -8714,7 +8711,7 @@ function $d({ toolbar: e }) {
|
|
|
8714
8711
|
h == null || h(!0), await k.getHandler().deleteObjects({
|
|
8715
8712
|
model: p,
|
|
8716
8713
|
ids: [c],
|
|
8717
|
-
context:
|
|
8714
|
+
context: I.current.getContext()
|
|
8718
8715
|
});
|
|
8719
8716
|
const E = l == null ? void 0 : l.filter((M) => M.id !== c);
|
|
8720
8717
|
w == null || w(E);
|
|
@@ -8732,7 +8729,7 @@ function $d({ toolbar: e }) {
|
|
|
8732
8729
|
const E = await k.getHandler().duplicate({
|
|
8733
8730
|
id: c,
|
|
8734
8731
|
model: p,
|
|
8735
|
-
context:
|
|
8732
|
+
context: I.current.getContext()
|
|
8736
8733
|
});
|
|
8737
8734
|
E && await (R == null ? void 0 : R([E]));
|
|
8738
8735
|
} catch (E) {
|
|
@@ -8743,13 +8740,13 @@ function $d({ toolbar: e }) {
|
|
|
8743
8740
|
}
|
|
8744
8741
|
const te = a || m || S || y;
|
|
8745
8742
|
function U(E) {
|
|
8746
|
-
|
|
8743
|
+
O == null || O({
|
|
8747
8744
|
actionData: E,
|
|
8748
|
-
values:
|
|
8749
|
-
fields:
|
|
8750
|
-
context:
|
|
8745
|
+
values: I.current.getValues(),
|
|
8746
|
+
fields: I.current.getFields(),
|
|
8747
|
+
context: I.current.getContext(),
|
|
8751
8748
|
onRefreshParentValues: () => {
|
|
8752
|
-
|
|
8749
|
+
I.current.fetchValues();
|
|
8753
8750
|
}
|
|
8754
8751
|
});
|
|
8755
8752
|
}
|
|
@@ -8817,7 +8814,7 @@ function $d({ toolbar: e }) {
|
|
|
8817
8814
|
loading: !1,
|
|
8818
8815
|
onClick: () => {
|
|
8819
8816
|
W(() => {
|
|
8820
|
-
|
|
8817
|
+
I.current.fetchValues();
|
|
8821
8818
|
});
|
|
8822
8819
|
}
|
|
8823
8820
|
}
|
|
@@ -8919,8 +8916,8 @@ function $d({ toolbar: e }) {
|
|
|
8919
8916
|
onFormSave: r
|
|
8920
8917
|
})).succeed || N({
|
|
8921
8918
|
relateData: E,
|
|
8922
|
-
values:
|
|
8923
|
-
fields:
|
|
8919
|
+
values: I.current.getValues(),
|
|
8920
|
+
fields: I.current.getFields(),
|
|
8924
8921
|
action_id: E.id,
|
|
8925
8922
|
action_type: E.type
|
|
8926
8923
|
});
|
|
@@ -9355,14 +9352,14 @@ const qd = (e) => {
|
|
|
9355
9352
|
setSearchVisible: w = void 0,
|
|
9356
9353
|
sorter: S = void 0,
|
|
9357
9354
|
setSorter: x = void 0,
|
|
9358
|
-
setTotalItems:
|
|
9355
|
+
setTotalItems: I = void 0,
|
|
9359
9356
|
setSearchTreeNameSearch: v = void 0,
|
|
9360
9357
|
setTreeIsLoading: V = void 0,
|
|
9361
9358
|
limit: T,
|
|
9362
9359
|
setLimit: R,
|
|
9363
9360
|
searchParams: C,
|
|
9364
9361
|
searchValues: _,
|
|
9365
|
-
setSearchValues:
|
|
9362
|
+
setSearchValues: O,
|
|
9366
9363
|
currentView: F
|
|
9367
9364
|
} = u || {}, [N, A] = b(!0);
|
|
9368
9365
|
le(() => {
|
|
@@ -9376,7 +9373,7 @@ const qd = (e) => {
|
|
|
9376
9373
|
setSearchTreeNameSearch: v,
|
|
9377
9374
|
setSelectedRowItems: m,
|
|
9378
9375
|
searchParams: C,
|
|
9379
|
-
setSearchValues:
|
|
9376
|
+
setSearchValues: O,
|
|
9380
9377
|
setSearchParams: y,
|
|
9381
9378
|
setSearchVisible: w,
|
|
9382
9379
|
setTreeIsLoading: V,
|
|
@@ -9390,7 +9387,7 @@ const qd = (e) => {
|
|
|
9390
9387
|
resultsActionView: h,
|
|
9391
9388
|
domain: s,
|
|
9392
9389
|
currentId: p,
|
|
9393
|
-
setActionViewTotalItems:
|
|
9390
|
+
setActionViewTotalItems: I,
|
|
9394
9391
|
limit: T,
|
|
9395
9392
|
setLimit: R
|
|
9396
9393
|
});
|
|
@@ -9536,11 +9533,11 @@ function Qd(e) {
|
|
|
9536
9533
|
searchTreeNameSearch: w,
|
|
9537
9534
|
treeIsLoading: S,
|
|
9538
9535
|
setPreviousView: x,
|
|
9539
|
-
previousView:
|
|
9536
|
+
previousView: I,
|
|
9540
9537
|
results: v,
|
|
9541
9538
|
limit: V,
|
|
9542
9539
|
totalItems: T
|
|
9543
|
-
} = ee(nt), { parentContext: R = {}, treeExpandable: C, toolbar: _ } = e,
|
|
9540
|
+
} = ee(nt), { parentContext: R = {}, treeExpandable: C, toolbar: _ } = e, O = Rn(
|
|
9544
9541
|
jt.FEATURE_ADVANCED_EXPORT
|
|
9545
9542
|
), { t: F } = he(), N = ee(
|
|
9546
9543
|
Kt
|
|
@@ -9548,10 +9545,10 @@ function Qd(e) {
|
|
|
9548
9545
|
xt(
|
|
9549
9546
|
"ctrl+l,command+l",
|
|
9550
9547
|
() => {
|
|
9551
|
-
|
|
9548
|
+
I && (x == null || x(n), o == null || o(I));
|
|
9552
9549
|
},
|
|
9553
9550
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
9554
|
-
[
|
|
9551
|
+
[I, n]
|
|
9555
9552
|
), xt(
|
|
9556
9553
|
"ctrl+f,command+f",
|
|
9557
9554
|
() => {
|
|
@@ -9713,7 +9710,7 @@ function Qd(e) {
|
|
|
9713
9710
|
onChangeView: (U) => {
|
|
9714
9711
|
x == null || x(n), o == null || o(U);
|
|
9715
9712
|
},
|
|
9716
|
-
previousView:
|
|
9713
|
+
previousView: I
|
|
9717
9714
|
}
|
|
9718
9715
|
)
|
|
9719
9716
|
] }),
|
|
@@ -9752,7 +9749,7 @@ function Qd(e) {
|
|
|
9752
9749
|
}
|
|
9753
9750
|
}
|
|
9754
9751
|
),
|
|
9755
|
-
|
|
9752
|
+
O && /* @__PURE__ */ D(se, { children: [
|
|
9756
9753
|
St(),
|
|
9757
9754
|
/* @__PURE__ */ i(
|
|
9758
9755
|
kt,
|
|
@@ -9883,10 +9880,10 @@ const Xd = (e) => {
|
|
|
9883
9880
|
onRowClicked: (g) => {
|
|
9884
9881
|
const { id: w } = g;
|
|
9885
9882
|
f(w);
|
|
9886
|
-
const S = u.findIndex((
|
|
9883
|
+
const S = u.findIndex((I) => I.id === w);
|
|
9887
9884
|
y == null || y(m), l(S);
|
|
9888
9885
|
const x = p.find(
|
|
9889
|
-
(
|
|
9886
|
+
(I) => I.type === "form"
|
|
9890
9887
|
);
|
|
9891
9888
|
d(x);
|
|
9892
9889
|
}
|
|
@@ -10020,9 +10017,9 @@ function ou(e, t) {
|
|
|
10020
10017
|
action_type: m,
|
|
10021
10018
|
treeExpandable: y = !1,
|
|
10022
10019
|
limit: g
|
|
10023
|
-
} = e, [w, S] = b(), [x,
|
|
10020
|
+
} = e, [w, S] = b(), [x, I] = b([]), [v, V] = b(!0), T = p || void 0, [R, C] = b(
|
|
10024
10021
|
T
|
|
10025
|
-
), [_,
|
|
10022
|
+
), [_, O] = b([]), [F, N] = b(), [A, W] = b([]), [L, H] = b(), [j, P] = b(0), [z, Z] = b(!1), [te, U] = b(!1), [E, J] = b(), { t: M } = he(), Q = ne(), q = ne(), me = ee(
|
|
10026
10023
|
ct
|
|
10027
10024
|
), {
|
|
10028
10025
|
setCurrentView: ae,
|
|
@@ -10129,7 +10126,7 @@ function ou(e, t) {
|
|
|
10129
10126
|
), He || (Ze(
|
|
10130
10127
|
`Error determining the first view to show for model ${o}.
|
|
10131
10128
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
10132
|
-
), Me == null || Me(l)), ke(He),
|
|
10129
|
+
), Me == null || Me(l)), ke(He), I(K), V(!1);
|
|
10133
10130
|
};
|
|
10134
10131
|
c({ tabKey: l, canWeClose: ye }), le(() => {
|
|
10135
10132
|
const K = x.find((Fe) => Fe.type === "tree"), ve = x.find((Fe) => u.id ? Fe.type === u.type && Fe.view_id === u.id : Fe.type === u.type);
|
|
@@ -10296,7 +10293,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
10296
10293
|
totalItems: j,
|
|
10297
10294
|
setTotalItems: P,
|
|
10298
10295
|
selectedRowItems: _,
|
|
10299
|
-
setSelectedRowItems:
|
|
10296
|
+
setSelectedRowItems: O,
|
|
10300
10297
|
setSearchTreeNameSearch: J,
|
|
10301
10298
|
searchTreeNameSearch: E,
|
|
10302
10299
|
goToResourceId: Oe,
|
|
@@ -10358,13 +10355,13 @@ function au(e) {
|
|
|
10358
10355
|
domain: s = [],
|
|
10359
10356
|
visible: a = !0,
|
|
10360
10357
|
parentContext: c = {}
|
|
10361
|
-
} = e, [l, u] = b(!1), [f, d] = b(!1), [p, h] = b(), [m, y] = b(), [g, w] = b(), [S, x] = b(1), [
|
|
10358
|
+
} = e, [l, u] = b(!1), [f, d] = b(!1), [p, h] = b(), [m, y] = b(), [g, w] = b(), [S, x] = b(1), [I, v] = b(0), V = ne(Ot), T = ne([]), [R, C] = b(0), [_, O] = b([]), [F, N] = b(void 0), [A, W] = b(), [L, H] = b(), [j, P] = b(), [z, Z] = b(!1), te = ne([]), U = (Y) => {
|
|
10362
10359
|
Z(!0), x(Y), v((Y - 1) * V.current);
|
|
10363
10360
|
}, E = async () => {
|
|
10364
10361
|
const Y = te.current.length > 0 ? te.current : s, de = nn(T.current, Y), { colors: pe } = It(m), { totalItems: Ee, results: Me, attrsEvaluated: De } = await k.getHandler().searchForTree({
|
|
10365
10362
|
params: de,
|
|
10366
10363
|
limit: V.current,
|
|
10367
|
-
offset:
|
|
10364
|
+
offset: I,
|
|
10368
10365
|
model: p,
|
|
10369
10366
|
fields: m.fields,
|
|
10370
10367
|
context: c,
|
|
@@ -10376,7 +10373,7 @@ function au(e) {
|
|
|
10376
10373
|
sorter: A,
|
|
10377
10374
|
fields: { ...m.fields, ...g.fields }
|
|
10378
10375
|
});
|
|
10379
|
-
Z(!1),
|
|
10376
|
+
Z(!1), O(ke);
|
|
10380
10377
|
const Ke = await Ee;
|
|
10381
10378
|
C(Ke);
|
|
10382
10379
|
}, J = async () => {
|
|
@@ -10388,7 +10385,7 @@ function au(e) {
|
|
|
10388
10385
|
};
|
|
10389
10386
|
le(() => {
|
|
10390
10387
|
f && a && J();
|
|
10391
|
-
}, [S,
|
|
10388
|
+
}, [S, I, f, a]);
|
|
10392
10389
|
const M = async (Y) => {
|
|
10393
10390
|
d(!1), u(!0), P(void 0);
|
|
10394
10391
|
try {
|
|
@@ -10453,7 +10450,7 @@ function au(e) {
|
|
|
10453
10450
|
sorter: Y,
|
|
10454
10451
|
fields: { ...m.fields, ...g.fields }
|
|
10455
10452
|
});
|
|
10456
|
-
|
|
10453
|
+
O(de);
|
|
10457
10454
|
},
|
|
10458
10455
|
context: c
|
|
10459
10456
|
}
|
|
@@ -10483,7 +10480,7 @@ function du(e, t) {
|
|
|
10483
10480
|
moveItemsEnabled: m
|
|
10484
10481
|
} = ee(br), y = ne(), g = ne(), [w] = qe(k.getHandler().getView), [S] = qe(
|
|
10485
10482
|
k.getHandler().readObjects
|
|
10486
|
-
), [x] = qe(k.getHandler().update),
|
|
10483
|
+
), [x] = qe(k.getHandler().update), I = Rn(
|
|
10487
10484
|
jt.FEATURE_READFORVIEW
|
|
10488
10485
|
);
|
|
10489
10486
|
le(() => {
|
|
@@ -10492,7 +10489,7 @@ function du(e, t) {
|
|
|
10492
10489
|
refresh: () => {
|
|
10493
10490
|
v();
|
|
10494
10491
|
},
|
|
10495
|
-
configDashboard:
|
|
10492
|
+
configDashboard: O
|
|
10496
10493
|
}));
|
|
10497
10494
|
async function v() {
|
|
10498
10495
|
u(!0), p(!0), d(void 0);
|
|
@@ -10605,7 +10602,7 @@ function du(e, t) {
|
|
|
10605
10602
|
context: o
|
|
10606
10603
|
});
|
|
10607
10604
|
}
|
|
10608
|
-
async function
|
|
10605
|
+
async function O() {
|
|
10609
10606
|
h(s);
|
|
10610
10607
|
}
|
|
10611
10608
|
return l ? /* @__PURE__ */ i(ft, {}) : f ? /* @__PURE__ */ i(Xe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(su, { onPositionItemsChanged: _, children: a.map((F, N) => {
|
|
@@ -10629,7 +10626,7 @@ function du(e, t) {
|
|
|
10629
10626
|
}
|
|
10630
10627
|
let me = null;
|
|
10631
10628
|
if ((M == null ? void 0 : M.type) === "graph") {
|
|
10632
|
-
const pe = W.server_action === !0 &&
|
|
10629
|
+
const pe = W.server_action === !0 && I ? Lo : Ht;
|
|
10633
10630
|
me = /* @__PURE__ */ i(
|
|
10634
10631
|
pe,
|
|
10635
10632
|
{
|
|
@@ -10744,14 +10741,14 @@ const uu = gt(du), fu = (e) => {
|
|
|
10744
10741
|
}, mu = (e) => {
|
|
10745
10742
|
const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((R) => R.operation !== "pendingRemove").map((R) => R.id), [a, c] = b([]), [l, u] = b(), [f, d] = b(!1), { relation: p, context: h, readOnly: m, field: y, columns: g } = n, w = ee(Le), { getContext: S } = w || {};
|
|
10746
10743
|
wt(() => {
|
|
10747
|
-
|
|
10744
|
+
I();
|
|
10748
10745
|
}, [r]);
|
|
10749
10746
|
const x = (R) => {
|
|
10750
10747
|
o == null || o({
|
|
10751
10748
|
items: R
|
|
10752
10749
|
});
|
|
10753
10750
|
};
|
|
10754
|
-
async function
|
|
10751
|
+
async function I() {
|
|
10755
10752
|
d(!0);
|
|
10756
10753
|
let R = [];
|
|
10757
10754
|
if (n.domain) {
|
|
@@ -10772,10 +10769,10 @@ const uu = gt(du), fu = (e) => {
|
|
|
10772
10769
|
params: R,
|
|
10773
10770
|
fieldsToRetrieve: [y],
|
|
10774
10771
|
context: { ...S == null ? void 0 : S(), ...h }
|
|
10775
|
-
})).map((
|
|
10776
|
-
const F =
|
|
10772
|
+
})).map((O) => {
|
|
10773
|
+
const F = O[y];
|
|
10777
10774
|
let N = F;
|
|
10778
|
-
return Array.isArray(F) && (N = F[1]), { label: N, value:
|
|
10775
|
+
return Array.isArray(F) && (N = F[1]), { label: N, value: O.id };
|
|
10779
10776
|
});
|
|
10780
10777
|
c(_);
|
|
10781
10778
|
} catch (C) {
|
|
@@ -10791,12 +10788,12 @@ const uu = gt(du), fu = (e) => {
|
|
|
10791
10788
|
}, V = () => {
|
|
10792
10789
|
T([]);
|
|
10793
10790
|
}, T = (R) => {
|
|
10794
|
-
const C = r.map((
|
|
10795
|
-
...
|
|
10791
|
+
const C = r.map((O) => R.includes(O.id) ? O.operation == "pendingRemove" ? {
|
|
10792
|
+
...O,
|
|
10796
10793
|
operation: "original"
|
|
10797
|
-
} :
|
|
10798
|
-
R.filter((
|
|
10799
|
-
C.push({ id:
|
|
10794
|
+
} : O : { id: O.id, operation: "pendingRemove" }), _ = C.map((O) => O.id);
|
|
10795
|
+
R.filter((O) => !_.includes(O)).map((O) => {
|
|
10796
|
+
C.push({ id: O, operation: "pendingLink" });
|
|
10800
10797
|
}), x(C);
|
|
10801
10798
|
};
|
|
10802
10799
|
return f && a.length === 0 ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
|
|
@@ -10966,21 +10963,21 @@ function Mu(e, t) {
|
|
|
10966
10963
|
retrieveAndOpenAction: m,
|
|
10967
10964
|
openShortcut: w
|
|
10968
10965
|
}));
|
|
10969
|
-
function p(
|
|
10970
|
-
if (
|
|
10971
|
-
const v = l.findIndex((V) => V.key ===
|
|
10966
|
+
function p(I) {
|
|
10967
|
+
if (I === o) {
|
|
10968
|
+
const v = l.findIndex((V) => V.key === I);
|
|
10972
10969
|
l[v - 1] && r(l[v - 1].key), l[v + 1] && r(l[v + 1].key);
|
|
10973
10970
|
}
|
|
10974
|
-
u(l.filter((v) => v.key !==
|
|
10971
|
+
u(l.filter((v) => v.key !== I)), f.current.delete(I);
|
|
10975
10972
|
}
|
|
10976
10973
|
function h({
|
|
10977
|
-
tabKey:
|
|
10974
|
+
tabKey: I,
|
|
10978
10975
|
canWeClose: v
|
|
10979
10976
|
}) {
|
|
10980
|
-
f.current.set(
|
|
10977
|
+
f.current.set(I, v);
|
|
10981
10978
|
}
|
|
10982
10979
|
async function m({
|
|
10983
|
-
action:
|
|
10980
|
+
action: I,
|
|
10984
10981
|
values: v,
|
|
10985
10982
|
forced_values: V,
|
|
10986
10983
|
initialViewType: T,
|
|
@@ -10988,14 +10985,14 @@ function Mu(e, t) {
|
|
|
10988
10985
|
domain: C = []
|
|
10989
10986
|
}) {
|
|
10990
10987
|
const _ = await k.getHandler().getActionData({
|
|
10991
|
-
action:
|
|
10988
|
+
action: I,
|
|
10992
10989
|
context: c
|
|
10993
10990
|
});
|
|
10994
10991
|
if (_.type === "ir.actions.wizard") {
|
|
10995
10992
|
Ze("Action type not supported");
|
|
10996
10993
|
return;
|
|
10997
10994
|
}
|
|
10998
|
-
const [
|
|
10995
|
+
const [O, F] = I.split(","), N = parseInt(F), A = Tt({
|
|
10999
10996
|
context: _.context,
|
|
11000
10997
|
values: a,
|
|
11001
10998
|
fields: {}
|
|
@@ -11045,7 +11042,7 @@ function Mu(e, t) {
|
|
|
11045
11042
|
title: j,
|
|
11046
11043
|
target: P,
|
|
11047
11044
|
initialView: E,
|
|
11048
|
-
action_type:
|
|
11045
|
+
action_type: O,
|
|
11049
11046
|
action_id: N,
|
|
11050
11047
|
values: v,
|
|
11051
11048
|
forced_values: V,
|
|
@@ -11055,7 +11052,7 @@ function Mu(e, t) {
|
|
|
11055
11052
|
});
|
|
11056
11053
|
}
|
|
11057
11054
|
function y({
|
|
11058
|
-
title:
|
|
11055
|
+
title: I,
|
|
11059
11056
|
content: v,
|
|
11060
11057
|
key: V,
|
|
11061
11058
|
action: T
|
|
@@ -11064,7 +11061,7 @@ function Mu(e, t) {
|
|
|
11064
11061
|
l.length === 1 && l[0].key === "welcome" && (R = [...l.filter((C) => C.key !== "welcome")]), u([
|
|
11065
11062
|
...R,
|
|
11066
11063
|
{
|
|
11067
|
-
title:
|
|
11064
|
+
title: I,
|
|
11068
11065
|
key: V,
|
|
11069
11066
|
closable: !0,
|
|
11070
11067
|
content: v,
|
|
@@ -11073,7 +11070,7 @@ function Mu(e, t) {
|
|
|
11073
11070
|
]), r(V);
|
|
11074
11071
|
}
|
|
11075
11072
|
async function g({
|
|
11076
|
-
relateData:
|
|
11073
|
+
relateData: I,
|
|
11077
11074
|
fields: v,
|
|
11078
11075
|
values: V,
|
|
11079
11076
|
action_id: T,
|
|
@@ -11082,17 +11079,17 @@ function Mu(e, t) {
|
|
|
11082
11079
|
const {
|
|
11083
11080
|
res_model: C,
|
|
11084
11081
|
context: _,
|
|
11085
|
-
domain:
|
|
11082
|
+
domain: O,
|
|
11086
11083
|
views: F,
|
|
11087
11084
|
target: N,
|
|
11088
11085
|
string: A,
|
|
11089
11086
|
limit: W
|
|
11090
|
-
} =
|
|
11087
|
+
} = I, [L, H] = F[0], j = { id: L, type: H }, P = Tt({
|
|
11091
11088
|
context: _,
|
|
11092
11089
|
values: { ...V, ...a },
|
|
11093
11090
|
fields: v
|
|
11094
|
-
}), z =
|
|
11095
|
-
domain:
|
|
11091
|
+
}), z = O ? await k.getHandler().evalDomain({
|
|
11092
|
+
domain: O,
|
|
11096
11093
|
values: Ft({
|
|
11097
11094
|
fields: v,
|
|
11098
11095
|
values: { ...V, ...a }
|
|
@@ -11113,7 +11110,7 @@ function Mu(e, t) {
|
|
|
11113
11110
|
limit: W
|
|
11114
11111
|
});
|
|
11115
11112
|
}
|
|
11116
|
-
async function w(
|
|
11113
|
+
async function w(I) {
|
|
11117
11114
|
const {
|
|
11118
11115
|
action_id: v,
|
|
11119
11116
|
action_type: V,
|
|
@@ -11121,8 +11118,8 @@ function Mu(e, t) {
|
|
|
11121
11118
|
view_id: R,
|
|
11122
11119
|
overrideUnsettedLimit: C = !1,
|
|
11123
11120
|
values: _ = {}
|
|
11124
|
-
} =
|
|
11125
|
-
action:
|
|
11121
|
+
} = I, O = `${V},${v}`, F = await k.getHandler().getActionData({
|
|
11122
|
+
action: O,
|
|
11126
11123
|
context: c
|
|
11127
11124
|
}), N = Tt({
|
|
11128
11125
|
context: F.context,
|
|
@@ -11179,14 +11176,14 @@ function Mu(e, t) {
|
|
|
11179
11176
|
});
|
|
11180
11177
|
}
|
|
11181
11178
|
async function S({
|
|
11182
|
-
model:
|
|
11179
|
+
model: I,
|
|
11183
11180
|
values: v,
|
|
11184
11181
|
forced_values: V,
|
|
11185
11182
|
initialViewType: T,
|
|
11186
11183
|
res_id: R,
|
|
11187
11184
|
domain: C
|
|
11188
11185
|
}) {
|
|
11189
|
-
const _ = await k.getHandler().getActionStringForModel(
|
|
11186
|
+
const _ = await k.getHandler().getActionStringForModel(I);
|
|
11190
11187
|
await m({
|
|
11191
11188
|
action: _,
|
|
11192
11189
|
values: v,
|
|
@@ -11197,14 +11194,14 @@ function Mu(e, t) {
|
|
|
11197
11194
|
});
|
|
11198
11195
|
}
|
|
11199
11196
|
async function x({
|
|
11200
|
-
domain:
|
|
11197
|
+
domain: I,
|
|
11201
11198
|
context: v,
|
|
11202
11199
|
model: V,
|
|
11203
11200
|
views: T,
|
|
11204
11201
|
title: R,
|
|
11205
11202
|
target: C,
|
|
11206
11203
|
initialView: _,
|
|
11207
|
-
action_id:
|
|
11204
|
+
action_id: O,
|
|
11208
11205
|
action_type: F,
|
|
11209
11206
|
res_id: N,
|
|
11210
11207
|
values: A,
|
|
@@ -11221,12 +11218,12 @@ function Mu(e, t) {
|
|
|
11221
11218
|
context: { ...c, ...v }
|
|
11222
11219
|
});
|
|
11223
11220
|
d.current.openActionModal({
|
|
11224
|
-
domain:
|
|
11221
|
+
domain: I,
|
|
11225
11222
|
model: V,
|
|
11226
11223
|
formView: P,
|
|
11227
11224
|
context: { ...c, ...v },
|
|
11228
11225
|
actionData: {
|
|
11229
|
-
action_id:
|
|
11226
|
+
action_id: O,
|
|
11230
11227
|
action_type: F,
|
|
11231
11228
|
res_id: N,
|
|
11232
11229
|
view_id: P.view_id
|
|
@@ -11237,20 +11234,20 @@ function Mu(e, t) {
|
|
|
11237
11234
|
y({
|
|
11238
11235
|
title: R,
|
|
11239
11236
|
action: {
|
|
11240
|
-
id:
|
|
11237
|
+
id: O,
|
|
11241
11238
|
type: F
|
|
11242
11239
|
},
|
|
11243
11240
|
content: /* @__PURE__ */ i(
|
|
11244
11241
|
di,
|
|
11245
11242
|
{
|
|
11246
|
-
action_id:
|
|
11243
|
+
action_id: O,
|
|
11247
11244
|
action_type: F,
|
|
11248
11245
|
tabKey: j,
|
|
11249
11246
|
title: R,
|
|
11250
11247
|
views: T,
|
|
11251
11248
|
model: V,
|
|
11252
11249
|
context: { ...c, ...v },
|
|
11253
|
-
domain:
|
|
11250
|
+
domain: I,
|
|
11254
11251
|
setCanWeClose: h,
|
|
11255
11252
|
initialView: P,
|
|
11256
11253
|
res_id: N,
|
|
@@ -11273,12 +11270,12 @@ function Mu(e, t) {
|
|
|
11273
11270
|
openDefaultActionForModel: S,
|
|
11274
11271
|
tabs: l,
|
|
11275
11272
|
activeKey: o,
|
|
11276
|
-
onRemoveTab: async (
|
|
11277
|
-
const v = f.current.get(
|
|
11278
|
-
(await (v == null ? void 0 : v()) || o === "welcome") && p(
|
|
11273
|
+
onRemoveTab: async (I) => {
|
|
11274
|
+
const v = f.current.get(I);
|
|
11275
|
+
(await (v == null ? void 0 : v()) || o === "welcome") && p(I);
|
|
11279
11276
|
},
|
|
11280
|
-
onChangeTab: (
|
|
11281
|
-
r(
|
|
11277
|
+
onChangeTab: (I) => {
|
|
11278
|
+
r(I);
|
|
11282
11279
|
},
|
|
11283
11280
|
children: /* @__PURE__ */ i(
|
|
11284
11281
|
Fc,
|
|
@@ -11410,53 +11407,53 @@ const { useToken: Bu } = je, Mf = (e) => {
|
|
|
11410
11407
|
currentView: w,
|
|
11411
11408
|
currentId: S,
|
|
11412
11409
|
openDefaultActionForModel: x
|
|
11413
|
-
} = h || {},
|
|
11410
|
+
} = h || {}, I = Ie(() => {
|
|
11414
11411
|
if (!w || !w.view_id || !w.extra)
|
|
11415
11412
|
return;
|
|
11416
|
-
const { action_id:
|
|
11417
|
-
if (!
|
|
11413
|
+
const { action_id: O, action_type: F } = w.extra || {};
|
|
11414
|
+
if (!O || !F) {
|
|
11418
11415
|
c(!1);
|
|
11419
11416
|
return;
|
|
11420
11417
|
}
|
|
11421
11418
|
const N = w.view_id;
|
|
11422
11419
|
let A = !1;
|
|
11423
11420
|
return w.type === "form" && (A = S || !1), {
|
|
11424
|
-
action_id:
|
|
11421
|
+
action_id: O,
|
|
11425
11422
|
action_type: F,
|
|
11426
11423
|
view_id: N,
|
|
11427
11424
|
res_id: A
|
|
11428
11425
|
};
|
|
11429
11426
|
}, [S, w]), v = Ie(() => {
|
|
11430
|
-
if (
|
|
11431
|
-
return JSON.stringify(
|
|
11432
|
-
}, [
|
|
11427
|
+
if (I)
|
|
11428
|
+
return JSON.stringify(I);
|
|
11429
|
+
}, [I]);
|
|
11433
11430
|
le(() => {
|
|
11434
11431
|
T();
|
|
11435
11432
|
}, [v]);
|
|
11436
|
-
function V(
|
|
11437
|
-
const F =
|
|
11433
|
+
function V(O) {
|
|
11434
|
+
const F = O;
|
|
11438
11435
|
(F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && m(F);
|
|
11439
11436
|
}
|
|
11440
11437
|
const T = X(async () => {
|
|
11441
|
-
if (!
|
|
11438
|
+
if (!I)
|
|
11442
11439
|
return;
|
|
11443
|
-
const
|
|
11444
|
-
|
|
11445
|
-
}, [
|
|
11440
|
+
const O = await n(I);
|
|
11441
|
+
O !== !1 && u(O), c(O !== !1);
|
|
11442
|
+
}, [I, n]);
|
|
11446
11443
|
async function R() {
|
|
11447
|
-
var
|
|
11448
|
-
(
|
|
11444
|
+
var O;
|
|
11445
|
+
(O = p == null ? void 0 : p.current) == null || O.close(), x == null || x({ model: "ir.ui.view_sc" });
|
|
11449
11446
|
}
|
|
11450
11447
|
const C = X(async () => {
|
|
11451
|
-
const
|
|
11452
|
-
return
|
|
11448
|
+
const O = await t();
|
|
11449
|
+
return O.length === 0 ? [
|
|
11453
11450
|
{
|
|
11454
11451
|
label: f == null ? void 0 : f("no_favorites"),
|
|
11455
11452
|
items: []
|
|
11456
11453
|
}
|
|
11457
11454
|
] : [
|
|
11458
11455
|
{
|
|
11459
|
-
items:
|
|
11456
|
+
items: O.map((N) => ({
|
|
11460
11457
|
...N,
|
|
11461
11458
|
id: N.id,
|
|
11462
11459
|
name: N.name,
|
|
@@ -11470,7 +11467,7 @@ const { useToken: Bu } = je, Mf = (e) => {
|
|
|
11470
11467
|
else {
|
|
11471
11468
|
if (!w)
|
|
11472
11469
|
return;
|
|
11473
|
-
const
|
|
11470
|
+
const O = y.find((L) => L.key === g), { id: F, type: N } = (O == null ? void 0 : O.action) || {}, A = w.view_id;
|
|
11474
11471
|
let W = !1;
|
|
11475
11472
|
if (!F || !N) {
|
|
11476
11473
|
c(!1);
|
|
@@ -11513,8 +11510,8 @@ const { useToken: Bu } = je, Mf = (e) => {
|
|
|
11513
11510
|
}
|
|
11514
11511
|
) }) })
|
|
11515
11512
|
] }),
|
|
11516
|
-
onOpenChange: (
|
|
11517
|
-
|
|
11513
|
+
onOpenChange: (O) => {
|
|
11514
|
+
O || s == null || s();
|
|
11518
11515
|
},
|
|
11519
11516
|
onRetrieveData: C
|
|
11520
11517
|
}
|