@fctc/interface-logic 1.5.5 → 1.5.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/{configs.mjs → configs.cjs} +152 -105
- package/dist/{configs.d.mts → configs.d.cts} +1 -1
- package/dist/configs.js +115 -140
- package/dist/{constants.mjs → constants.cjs} +40 -2
- package/dist/constants.js +2 -41
- package/dist/{environment.mjs → environment.cjs} +208 -154
- package/dist/environment.js +167 -189
- package/dist/{hooks.mjs → hooks.cjs} +1893 -1627
- package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
- package/dist/hooks.js +1788 -1726
- package/dist/{provider.mjs → provider.cjs} +648 -557
- package/dist/{provider.d.mts → provider.d.cts} +4 -3
- package/dist/provider.d.ts +4 -3
- package/dist/provider.js +608 -591
- package/dist/{services.mjs → services.cjs} +1607 -1398
- package/dist/{services.d.mts → services.d.cts} +1 -1
- package/dist/services.js +1560 -1437
- package/dist/{store.mjs → store.cjs} +148 -30
- package/dist/{store.d.mts → store.d.cts} +127 -127
- package/dist/store.d.ts +127 -127
- package/dist/store.js +43 -131
- package/dist/types.cjs +17 -0
- package/dist/{types.d.mts → types.d.cts} +1 -1
- package/dist/types.js +0 -18
- package/dist/{utils.mjs → utils.cjs} +202 -115
- package/dist/{utils.d.mts → utils.d.cts} +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +135 -176
- package/package.json +23 -11
- package/dist/types.mjs +0 -0
- /package/dist/{constants.d.mts → constants.d.cts} +0 -0
- /package/dist/{environment.d.mts → environment.d.cts} +0 -0
- /package/dist/{view-type-BGJfDe73.d.mts → view-type-BGJfDe73.d.cts} +0 -0
package/dist/hooks.js
CHANGED
|
@@ -1,108 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __pow = Math.pow;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
11
19
|
};
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __async = (__this, __arguments, generator) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
var fulfilled = (value) => {
|
|
24
|
+
try {
|
|
25
|
+
step(generator.next(value));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
reject(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var rejected = (value) => {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.throw(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
38
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
|
+
});
|
|
19
40
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/hooks.ts
|
|
31
|
-
var hooks_exports = {};
|
|
32
|
-
__export(hooks_exports, {
|
|
33
|
-
useButton: () => use_button_default,
|
|
34
|
-
useChangeStatus: () => use_change_status_default,
|
|
35
|
-
useDelete: () => use_delete_default,
|
|
36
|
-
useDeleteComment: () => use_delete_comment_default,
|
|
37
|
-
useDuplicateRecord: () => use_duplicate_record_default,
|
|
38
|
-
useExecuteImport: () => uss_execute_import_default,
|
|
39
|
-
useExportExcel: () => use_export_excel_default,
|
|
40
|
-
useForgotPassword: () => use_forgot_password_default,
|
|
41
|
-
useForgotPasswordSSO: () => use_forgotpassword_sso_default,
|
|
42
|
-
useGet2FAMethods: () => uset_get_2FA_method_default,
|
|
43
|
-
useGetAccessByCode: () => use_get_access_by_code_default,
|
|
44
|
-
useGetActionDetail: () => use_get_action_detail_default,
|
|
45
|
-
useGetAll: () => use_get_all_default,
|
|
46
|
-
useGetCalendar: () => use_get_calendar_default,
|
|
47
|
-
useGetComment: () => use_get_comment_default,
|
|
48
|
-
useGetCompanyInfo: () => use_get_company_info_default,
|
|
49
|
-
useGetConversionRate: () => use_get_conversion_rate_default,
|
|
50
|
-
useGetCurrency: () => use_get_currency_default,
|
|
51
|
-
useGetCurrentCompany: () => use_get_current_company_default,
|
|
52
|
-
useGetDetail: () => use_get_detail_default,
|
|
53
|
-
useGetFieldExport: () => use_get_field_export_default,
|
|
54
|
-
useGetFieldOnChange: () => use_get_field_onchange_default,
|
|
55
|
-
useGetFieldsViewSecurity: () => use_get_fields_view_security_default,
|
|
56
|
-
useGetFileExcel: () => use_get_file_excel_default,
|
|
57
|
-
useGetFormView: () => use_get_form_view_default,
|
|
58
|
-
useGetGroups: () => use_get_groups_default,
|
|
59
|
-
useGetImage: () => use_get_image_default,
|
|
60
|
-
useGetListCompany: () => use_get_list_company_default,
|
|
61
|
-
useGetListData: () => use_get_list_data_default,
|
|
62
|
-
useGetListMyBankAccount: () => use_get_list_my_bank_account_default,
|
|
63
|
-
useGetMenu: () => use_get_menu_default,
|
|
64
|
-
useGetPrintReport: () => use_get_print_report_default,
|
|
65
|
-
useGetProGressBar: () => use_get_progress_bar_default,
|
|
66
|
-
useGetProfile: () => use_get_profile_default,
|
|
67
|
-
useGetProvider: () => use_get_provider_default,
|
|
68
|
-
useGetResequence: () => use_resequence_default,
|
|
69
|
-
useGetSelection: () => use_get_selection_default,
|
|
70
|
-
useGetUser: () => use_get_user_default,
|
|
71
|
-
useGetView: () => use_get_view_default,
|
|
72
|
-
useGrantAccess: () => use_grant_access_default,
|
|
73
|
-
useIsValidToken: () => use_isvalid_token_default,
|
|
74
|
-
useLoadAction: () => use_load_action_default,
|
|
75
|
-
useLoadMessage: () => use_load_message_default,
|
|
76
|
-
useLoginCredential: () => use_login_credential_default,
|
|
77
|
-
useLoginSocial: () => use_login_socical_default,
|
|
78
|
-
useLogout: () => use_logout_default,
|
|
79
|
-
useModel: () => use_model_default,
|
|
80
|
-
useOdooDataTransform: () => use_odoo_data_transform_default,
|
|
81
|
-
useOnChangeForm: () => use_onchange_form_default,
|
|
82
|
-
useParsePreview: () => use_parse_preview_default,
|
|
83
|
-
usePrint: () => use_print_default,
|
|
84
|
-
useRemoveRow: () => use_remove_row_default,
|
|
85
|
-
useRemoveTotpSetup: () => use_remove_totp_setup_default,
|
|
86
|
-
useRequestSetupTotp: () => use_request_setup_totp_default,
|
|
87
|
-
useResetPassword: () => use_reset_password_default,
|
|
88
|
-
useResetPasswordSSO: () => use_reset_password_sso_default,
|
|
89
|
-
useRunAction: () => use_run_action_default,
|
|
90
|
-
useSave: () => use_save_default,
|
|
91
|
-
useSendComment: () => use_send_comment_default,
|
|
92
|
-
useSettingsWebRead2fa: () => use_settings_web_read_2fa_default,
|
|
93
|
-
useSignInSSO: () => use_signin_sso_default,
|
|
94
|
-
useSwitchLocale: () => use_switch_locale_default,
|
|
95
|
-
useUpdatePassword: () => use_update_password_default,
|
|
96
|
-
useUploadFile: () => use_upload_file_default,
|
|
97
|
-
useUploadIdFile: () => use_upload_id_file_default,
|
|
98
|
-
useUploadImage: () => use_upload_image_default,
|
|
99
|
-
useVerify2FA: () => use_verify_2FA_default,
|
|
100
|
-
useVerifyTotp: () => use_verify_totp_default
|
|
101
|
-
});
|
|
102
|
-
module.exports = __toCommonJS(hooks_exports);
|
|
103
41
|
|
|
104
42
|
// src/hooks/auth/use-forgot-password.ts
|
|
105
|
-
|
|
43
|
+
import { useMutation } from "@tanstack/react-query";
|
|
106
44
|
|
|
107
45
|
// src/constants/api/uri-constant.ts
|
|
108
46
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -135,10 +73,10 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
135
73
|
})(UriConstants || {});
|
|
136
74
|
|
|
137
75
|
// src/configs/axios-client.ts
|
|
138
|
-
|
|
76
|
+
import axios from "axios";
|
|
139
77
|
|
|
140
78
|
// src/utils/format.ts
|
|
141
|
-
|
|
79
|
+
import moment from "moment";
|
|
142
80
|
|
|
143
81
|
// src/constants/widget/widget-avatar-constant.ts
|
|
144
82
|
var WIDGETAVATAR = /* @__PURE__ */ ((WIDGETAVATAR2) => {
|
|
@@ -1225,22 +1163,6 @@ var PyRelativeDelta = class _PyRelativeDelta {
|
|
|
1225
1163
|
this.microsecond = params.microsecond;
|
|
1226
1164
|
this.weekday = params.weekday;
|
|
1227
1165
|
}
|
|
1228
|
-
years;
|
|
1229
|
-
months;
|
|
1230
|
-
days;
|
|
1231
|
-
hours;
|
|
1232
|
-
minutes;
|
|
1233
|
-
seconds;
|
|
1234
|
-
microseconds;
|
|
1235
|
-
leapDays;
|
|
1236
|
-
year;
|
|
1237
|
-
month;
|
|
1238
|
-
day;
|
|
1239
|
-
hour;
|
|
1240
|
-
minute;
|
|
1241
|
-
second;
|
|
1242
|
-
microsecond;
|
|
1243
|
-
weekday;
|
|
1244
1166
|
negate() {
|
|
1245
1167
|
return new _PyRelativeDelta(this, -1);
|
|
1246
1168
|
}
|
|
@@ -1355,7 +1277,7 @@ function execOnIterable(iterable, func) {
|
|
|
1355
1277
|
if (typeof iterable === "object" && !Array.isArray(iterable) && !(iterable instanceof Set)) {
|
|
1356
1278
|
iterable = Object.keys(iterable);
|
|
1357
1279
|
}
|
|
1358
|
-
if (typeof iterable
|
|
1280
|
+
if (typeof (iterable == null ? void 0 : iterable[Symbol.iterator]) !== "function") {
|
|
1359
1281
|
throw new EvaluationError("value not iterable");
|
|
1360
1282
|
}
|
|
1361
1283
|
return func(iterable);
|
|
@@ -1678,7 +1600,7 @@ function applyBinaryOp(ast, context) {
|
|
|
1678
1600
|
}
|
|
1679
1601
|
return Math.floor(left / right);
|
|
1680
1602
|
case "**":
|
|
1681
|
-
return left
|
|
1603
|
+
return __pow(left, right);
|
|
1682
1604
|
case "==":
|
|
1683
1605
|
return isEqual(left, right);
|
|
1684
1606
|
case "<>":
|
|
@@ -1800,7 +1722,7 @@ function evaluate(ast, context = {}) {
|
|
|
1800
1722
|
const dicts = /* @__PURE__ */ new Set();
|
|
1801
1723
|
let pyContext;
|
|
1802
1724
|
const evalContext = Object.create(context);
|
|
1803
|
-
if (!evalContext
|
|
1725
|
+
if (!(evalContext == null ? void 0 : evalContext.context)) {
|
|
1804
1726
|
Object.defineProperty(evalContext, "context", {
|
|
1805
1727
|
get() {
|
|
1806
1728
|
if (!pyContext) {
|
|
@@ -1811,17 +1733,18 @@ function evaluate(ast, context = {}) {
|
|
|
1811
1733
|
});
|
|
1812
1734
|
}
|
|
1813
1735
|
function _innerEvaluate(ast2) {
|
|
1814
|
-
|
|
1736
|
+
var _a, _b, _c;
|
|
1737
|
+
switch (ast2 == null ? void 0 : ast2.type) {
|
|
1815
1738
|
case 0:
|
|
1816
1739
|
// Number
|
|
1817
1740
|
case 1:
|
|
1818
1741
|
return ast2.value;
|
|
1819
1742
|
case 5:
|
|
1820
1743
|
if (ast2.value in evalContext) {
|
|
1821
|
-
if (typeof evalContext[ast2.value] === "object" && evalContext[ast2.value]
|
|
1822
|
-
return evalContext[ast2.value]
|
|
1744
|
+
if (typeof evalContext[ast2.value] === "object" && ((_a = evalContext[ast2.value]) == null ? void 0 : _a.id)) {
|
|
1745
|
+
return (_b = evalContext[ast2.value]) == null ? void 0 : _b.id;
|
|
1823
1746
|
}
|
|
1824
|
-
return evalContext[ast2.value]
|
|
1747
|
+
return (_c = evalContext[ast2.value]) != null ? _c : false;
|
|
1825
1748
|
} else if (ast2.value in BUILTINS) {
|
|
1826
1749
|
return BUILTINS[ast2.value];
|
|
1827
1750
|
} else {
|
|
@@ -1858,7 +1781,7 @@ function evaluate(ast, context = {}) {
|
|
|
1858
1781
|
const args = ast2.args.map(_evaluate);
|
|
1859
1782
|
const kwargs = {};
|
|
1860
1783
|
for (const kwarg in ast2.kwargs) {
|
|
1861
|
-
kwargs[kwarg] = _evaluate(ast2
|
|
1784
|
+
kwargs[kwarg] = _evaluate(ast2 == null ? void 0 : ast2.kwargs[kwarg]);
|
|
1862
1785
|
}
|
|
1863
1786
|
if (fnValue === PyDate || fnValue === PyDateTime || fnValue === PyTime || fnValue === PyRelativeDelta || fnValue === PyTimeDelta) {
|
|
1864
1787
|
return fnValue.create(...args, kwargs);
|
|
@@ -1937,9 +1860,25 @@ function escapeRegExp(str) {
|
|
|
1937
1860
|
var InvalidDomainError = class extends Error {
|
|
1938
1861
|
};
|
|
1939
1862
|
var Domain = class _Domain {
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1863
|
+
constructor(descr = []) {
|
|
1864
|
+
this.ast = { type: -1, value: null };
|
|
1865
|
+
if (descr instanceof _Domain) {
|
|
1866
|
+
return new _Domain(descr.toString());
|
|
1867
|
+
} else {
|
|
1868
|
+
let rawAST;
|
|
1869
|
+
try {
|
|
1870
|
+
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1871
|
+
} catch (error) {
|
|
1872
|
+
throw new InvalidDomainError(
|
|
1873
|
+
`Invalid domain representation: ${descr}`,
|
|
1874
|
+
{
|
|
1875
|
+
cause: error
|
|
1876
|
+
}
|
|
1877
|
+
);
|
|
1878
|
+
}
|
|
1879
|
+
this.ast = normalizeDomainAST(rawAST);
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1943
1882
|
static combine(domains, operator) {
|
|
1944
1883
|
if (domains.length === 0) {
|
|
1945
1884
|
return new _Domain([]);
|
|
@@ -2018,24 +1957,6 @@ var Domain = class _Domain {
|
|
|
2018
1957
|
processLeaf(d.ast.value, 0, "&", newDomain);
|
|
2019
1958
|
return newDomain;
|
|
2020
1959
|
}
|
|
2021
|
-
constructor(descr = []) {
|
|
2022
|
-
if (descr instanceof _Domain) {
|
|
2023
|
-
return new _Domain(descr.toString());
|
|
2024
|
-
} else {
|
|
2025
|
-
let rawAST;
|
|
2026
|
-
try {
|
|
2027
|
-
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
2028
|
-
} catch (error) {
|
|
2029
|
-
throw new InvalidDomainError(
|
|
2030
|
-
`Invalid domain representation: ${descr}`,
|
|
2031
|
-
{
|
|
2032
|
-
cause: error
|
|
2033
|
-
}
|
|
2034
|
-
);
|
|
2035
|
-
}
|
|
2036
|
-
this.ast = normalizeDomainAST(rawAST);
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
1960
|
contains(record) {
|
|
2040
1961
|
const expr = evaluate(this.ast, record);
|
|
2041
1962
|
return matchDomain(record, expr);
|
|
@@ -2054,7 +1975,7 @@ var Domain = class _Domain {
|
|
|
2054
1975
|
return evaluatedAsList;
|
|
2055
1976
|
}
|
|
2056
1977
|
return this.toString();
|
|
2057
|
-
} catch {
|
|
1978
|
+
} catch (e) {
|
|
2058
1979
|
return this.toString();
|
|
2059
1980
|
}
|
|
2060
1981
|
}
|
|
@@ -2254,7 +2175,7 @@ function matchDomain(record, domain) {
|
|
|
2254
2175
|
}
|
|
2255
2176
|
|
|
2256
2177
|
// src/utils/function.ts
|
|
2257
|
-
|
|
2178
|
+
import { useEffect, useState } from "react";
|
|
2258
2179
|
var toQueryString = (params) => {
|
|
2259
2180
|
return Object.keys(params).map(
|
|
2260
2181
|
(key) => encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString())
|
|
@@ -2297,22 +2218,22 @@ var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
|
|
|
2297
2218
|
|
|
2298
2219
|
// src/utils/storage/local-storage.ts
|
|
2299
2220
|
var localStorageUtils = () => {
|
|
2300
|
-
const setToken =
|
|
2221
|
+
const setToken = (access_token) => __async(null, null, function* () {
|
|
2301
2222
|
localStorage.setItem("accessToken", access_token);
|
|
2302
|
-
};
|
|
2303
|
-
const setRefreshToken =
|
|
2223
|
+
});
|
|
2224
|
+
const setRefreshToken = (refresh_token) => __async(null, null, function* () {
|
|
2304
2225
|
localStorage.setItem("refreshToken", refresh_token);
|
|
2305
|
-
};
|
|
2306
|
-
const getAccessToken =
|
|
2226
|
+
});
|
|
2227
|
+
const getAccessToken = () => __async(null, null, function* () {
|
|
2307
2228
|
return localStorage.getItem("accessToken");
|
|
2308
|
-
};
|
|
2309
|
-
const getRefreshToken =
|
|
2229
|
+
});
|
|
2230
|
+
const getRefreshToken = () => __async(null, null, function* () {
|
|
2310
2231
|
return localStorage.getItem("refreshToken");
|
|
2311
|
-
};
|
|
2312
|
-
const clearToken =
|
|
2232
|
+
});
|
|
2233
|
+
const clearToken = () => __async(null, null, function* () {
|
|
2313
2234
|
localStorage.removeItem("accessToken");
|
|
2314
2235
|
localStorage.removeItem("refreshToken");
|
|
2315
|
-
};
|
|
2236
|
+
});
|
|
2316
2237
|
return {
|
|
2317
2238
|
setToken,
|
|
2318
2239
|
setRefreshToken,
|
|
@@ -2324,9 +2245,9 @@ var localStorageUtils = () => {
|
|
|
2324
2245
|
|
|
2325
2246
|
// src/utils/storage/session-storage.ts
|
|
2326
2247
|
var sessionStorageUtils = () => {
|
|
2327
|
-
const getBrowserSession =
|
|
2248
|
+
const getBrowserSession = () => __async(null, null, function* () {
|
|
2328
2249
|
return sessionStorage.getItem("browserSession");
|
|
2329
|
-
};
|
|
2250
|
+
});
|
|
2330
2251
|
return {
|
|
2331
2252
|
getBrowserSession
|
|
2332
2253
|
};
|
|
@@ -2335,13 +2256,14 @@ var sessionStorageUtils = () => {
|
|
|
2335
2256
|
// src/configs/axios-client.ts
|
|
2336
2257
|
var axiosClient = {
|
|
2337
2258
|
init(config) {
|
|
2338
|
-
|
|
2339
|
-
const
|
|
2259
|
+
var _a, _b;
|
|
2260
|
+
const localStorage2 = (_a = config.localStorageUtils) != null ? _a : localStorageUtils();
|
|
2261
|
+
const sessionStorage2 = (_b = config.sessionStorageUtils) != null ? _b : sessionStorageUtils();
|
|
2340
2262
|
const db = config.db;
|
|
2341
2263
|
let isRefreshing = false;
|
|
2342
2264
|
let failedQueue = [];
|
|
2343
2265
|
const processQueue = (error, token = null) => {
|
|
2344
|
-
failedQueue
|
|
2266
|
+
failedQueue == null ? void 0 : failedQueue.forEach((prom) => {
|
|
2345
2267
|
if (error) {
|
|
2346
2268
|
prom.reject(error);
|
|
2347
2269
|
} else {
|
|
@@ -2350,21 +2272,21 @@ var axiosClient = {
|
|
|
2350
2272
|
});
|
|
2351
2273
|
failedQueue = [];
|
|
2352
2274
|
};
|
|
2353
|
-
const instance =
|
|
2354
|
-
adapter:
|
|
2275
|
+
const instance = axios.create({
|
|
2276
|
+
adapter: axios.defaults.adapter,
|
|
2355
2277
|
baseURL: config.baseUrl,
|
|
2356
2278
|
timeout: 5e4,
|
|
2357
2279
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2358
2280
|
});
|
|
2359
2281
|
instance.interceptors.request.use(
|
|
2360
|
-
|
|
2282
|
+
(config2) => __async(null, null, function* () {
|
|
2361
2283
|
const useRefreshToken = config2.useRefreshToken;
|
|
2362
|
-
const token = useRefreshToken ?
|
|
2284
|
+
const token = useRefreshToken ? yield localStorage2.getRefreshToken() : yield localStorage2.getAccessToken();
|
|
2363
2285
|
if (token) {
|
|
2364
2286
|
config2.headers["Authorization"] = "Bearer " + token;
|
|
2365
2287
|
}
|
|
2366
2288
|
return config2;
|
|
2367
|
-
},
|
|
2289
|
+
}),
|
|
2368
2290
|
(error) => {
|
|
2369
2291
|
Promise.reject(error);
|
|
2370
2292
|
}
|
|
@@ -2373,19 +2295,21 @@ var axiosClient = {
|
|
|
2373
2295
|
(response) => {
|
|
2374
2296
|
return handleResponse(response);
|
|
2375
2297
|
},
|
|
2376
|
-
|
|
2377
|
-
|
|
2298
|
+
(error) => __async(null, null, function* () {
|
|
2299
|
+
var _a2, _b2, _c;
|
|
2300
|
+
const handleError3 = (error2) => __async(null, null, function* () {
|
|
2301
|
+
var _a3;
|
|
2378
2302
|
if (!error2.response) {
|
|
2379
2303
|
return error2;
|
|
2380
2304
|
}
|
|
2381
2305
|
const { data } = error2.response;
|
|
2382
|
-
if (data && data.code === 400 && ["invalid_grant"].includes(data.data
|
|
2383
|
-
|
|
2306
|
+
if (data && data.code === 400 && ["invalid_grant"].includes((_a3 = data.data) == null ? void 0 : _a3.error)) {
|
|
2307
|
+
yield clearAuthToken();
|
|
2384
2308
|
}
|
|
2385
2309
|
return data;
|
|
2386
|
-
};
|
|
2310
|
+
});
|
|
2387
2311
|
const originalRequest = error.config;
|
|
2388
|
-
if ((error.response
|
|
2312
|
+
if ((((_a2 = error.response) == null ? void 0 : _a2.status) === 403 || ((_b2 = error.response) == null ? void 0 : _b2.status) === 401 || ((_c = error.response) == null ? void 0 : _c.status) === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401, "ERR_2FA_006"].includes(
|
|
2389
2313
|
error.response.data.code
|
|
2390
2314
|
)) {
|
|
2391
2315
|
if (isRefreshing) {
|
|
@@ -2398,18 +2322,19 @@ var axiosClient = {
|
|
|
2398
2322
|
token
|
|
2399
2323
|
);
|
|
2400
2324
|
return instance.request(originalRequest);
|
|
2401
|
-
}).catch(
|
|
2402
|
-
|
|
2403
|
-
|
|
2325
|
+
}).catch((err) => __async(null, null, function* () {
|
|
2326
|
+
var _a3, _b3;
|
|
2327
|
+
if ((((_a3 = err.response) == null ? void 0 : _a3.status) === 400 || ((_b3 = err.response) == null ? void 0 : _b3.status) === 401) && ["invalid_grant"].includes(err.response.data.error)) {
|
|
2328
|
+
yield clearAuthToken();
|
|
2404
2329
|
}
|
|
2405
|
-
});
|
|
2330
|
+
}));
|
|
2406
2331
|
}
|
|
2407
|
-
const browserSession =
|
|
2408
|
-
const refreshToken =
|
|
2409
|
-
const accessTokenExp =
|
|
2332
|
+
const browserSession = yield sessionStorage2.getBrowserSession();
|
|
2333
|
+
const refreshToken = yield localStorage2.getRefreshToken();
|
|
2334
|
+
const accessTokenExp = yield localStorage2.getAccessToken();
|
|
2410
2335
|
isRefreshing = true;
|
|
2411
2336
|
if (!refreshToken && (!browserSession || browserSession == "unActive")) {
|
|
2412
|
-
|
|
2337
|
+
yield clearAuthToken();
|
|
2413
2338
|
} else {
|
|
2414
2339
|
const payload = Object.fromEntries(
|
|
2415
2340
|
Object.entries({
|
|
@@ -2420,8 +2345,9 @@ var axiosClient = {
|
|
|
2420
2345
|
}).filter(([_, value]) => !!value)
|
|
2421
2346
|
);
|
|
2422
2347
|
return new Promise(function(resolve) {
|
|
2423
|
-
|
|
2424
|
-
|
|
2348
|
+
var _a3;
|
|
2349
|
+
axios.post(
|
|
2350
|
+
`${config.baseUrl}${(_a3 = config.refreshTokenEndpoint) != null ? _a3 : "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
2425
2351
|
payload,
|
|
2426
2352
|
{
|
|
2427
2353
|
headers: {
|
|
@@ -2429,11 +2355,11 @@ var axiosClient = {
|
|
|
2429
2355
|
Authorization: `Bearer ${accessTokenExp}`
|
|
2430
2356
|
}
|
|
2431
2357
|
}
|
|
2432
|
-
).then(
|
|
2358
|
+
).then((res) => __async(null, null, function* () {
|
|
2433
2359
|
const data = res.data;
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2360
|
+
yield localStorage2.setToken(data.access_token);
|
|
2361
|
+
yield localStorage2.setRefreshToken(data.refresh_token);
|
|
2362
|
+
axios.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
|
|
2437
2363
|
originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
|
|
2438
2364
|
originalRequest.data = updateTokenParamInOriginalRequest(
|
|
2439
2365
|
originalRequest,
|
|
@@ -2441,25 +2367,26 @@ var axiosClient = {
|
|
|
2441
2367
|
);
|
|
2442
2368
|
processQueue(null, data.access_token);
|
|
2443
2369
|
resolve(instance.request(originalRequest));
|
|
2444
|
-
}).catch(
|
|
2445
|
-
|
|
2446
|
-
|
|
2370
|
+
})).catch((err) => __async(null, null, function* () {
|
|
2371
|
+
var _a4;
|
|
2372
|
+
if (err && ((err == null ? void 0 : err.error_code) === "AUTHEN_FAIL" || (err == null ? void 0 : err.error_code) === "TOKEN_EXPIRED" || (err == null ? void 0 : err.error_code) === "TOKEN_INCORRECT" || (err == null ? void 0 : err.code) === "ERR_BAD_REQUEST") || (err == null ? void 0 : err.error_code) === "ERR_2FA_006") {
|
|
2373
|
+
yield clearAuthToken();
|
|
2447
2374
|
}
|
|
2448
2375
|
if (err && err.response) {
|
|
2449
|
-
const { error_code } = err.response
|
|
2376
|
+
const { error_code } = ((_a4 = err.response) == null ? void 0 : _a4.data) || {};
|
|
2450
2377
|
if (error_code === "AUTHEN_FAIL") {
|
|
2451
|
-
|
|
2378
|
+
yield clearAuthToken();
|
|
2452
2379
|
}
|
|
2453
2380
|
}
|
|
2454
2381
|
processQueue(err, null);
|
|
2455
|
-
}).finally(() => {
|
|
2382
|
+
})).finally(() => {
|
|
2456
2383
|
isRefreshing = false;
|
|
2457
2384
|
});
|
|
2458
2385
|
});
|
|
2459
2386
|
}
|
|
2460
2387
|
}
|
|
2461
|
-
return Promise.reject(
|
|
2462
|
-
}
|
|
2388
|
+
return Promise.reject(yield handleError3(error));
|
|
2389
|
+
})
|
|
2463
2390
|
);
|
|
2464
2391
|
const handleResponse = (res) => {
|
|
2465
2392
|
if (res && res.data) {
|
|
@@ -2468,6 +2395,7 @@ var axiosClient = {
|
|
|
2468
2395
|
return res;
|
|
2469
2396
|
};
|
|
2470
2397
|
const handleError2 = (error) => {
|
|
2398
|
+
var _a2, _b2, _c;
|
|
2471
2399
|
if (error.isAxiosError && error.code === "ECONNABORTED") {
|
|
2472
2400
|
console.error("Request Timeout Error:", error);
|
|
2473
2401
|
return "Request Timeout Error";
|
|
@@ -2475,17 +2403,17 @@ var axiosClient = {
|
|
|
2475
2403
|
console.error("Network Error:", error);
|
|
2476
2404
|
return "Network Error";
|
|
2477
2405
|
} else {
|
|
2478
|
-
console.error("Other Error:", error
|
|
2479
|
-
const errorMessage = error
|
|
2480
|
-
return { message: errorMessage, status: error
|
|
2406
|
+
console.error("Other Error:", error == null ? void 0 : error.response);
|
|
2407
|
+
const errorMessage = ((_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "An error occurred";
|
|
2408
|
+
return { message: errorMessage, status: (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status };
|
|
2481
2409
|
}
|
|
2482
2410
|
};
|
|
2483
|
-
const clearAuthToken =
|
|
2484
|
-
|
|
2411
|
+
const clearAuthToken = () => __async(null, null, function* () {
|
|
2412
|
+
yield localStorage2.clearToken();
|
|
2485
2413
|
if (typeof window !== "undefined") {
|
|
2486
2414
|
window.location.href = `/login`;
|
|
2487
2415
|
}
|
|
2488
|
-
};
|
|
2416
|
+
});
|
|
2489
2417
|
function formatUrl(url, db2) {
|
|
2490
2418
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2491
2419
|
}
|
|
@@ -2509,14 +2437,14 @@ var axiosClient = {
|
|
|
2509
2437
|
};
|
|
2510
2438
|
|
|
2511
2439
|
// src/store/index.ts
|
|
2512
|
-
|
|
2440
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
2513
2441
|
|
|
2514
2442
|
// src/store/reducers/breadcrums-slice/index.ts
|
|
2515
|
-
|
|
2443
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2516
2444
|
var initialState = {
|
|
2517
2445
|
breadCrumbs: []
|
|
2518
2446
|
};
|
|
2519
|
-
var breadcrumbsSlice =
|
|
2447
|
+
var breadcrumbsSlice = createSlice({
|
|
2520
2448
|
name: "breadcrumbs",
|
|
2521
2449
|
initialState,
|
|
2522
2450
|
reducers: {
|
|
@@ -2529,7 +2457,7 @@ var { setBreadCrumbs } = breadcrumbsSlice.actions;
|
|
|
2529
2457
|
var breadcrums_slice_default = breadcrumbsSlice.reducer;
|
|
2530
2458
|
|
|
2531
2459
|
// src/store/reducers/env-slice/index.ts
|
|
2532
|
-
|
|
2460
|
+
import { createSlice as createSlice2 } from "@reduxjs/toolkit";
|
|
2533
2461
|
var initialState2 = {
|
|
2534
2462
|
baseUrl: "",
|
|
2535
2463
|
requests: null,
|
|
@@ -2550,7 +2478,7 @@ var initialState2 = {
|
|
|
2550
2478
|
tz: "Asia/Saigon"
|
|
2551
2479
|
}
|
|
2552
2480
|
};
|
|
2553
|
-
var envSlice = (
|
|
2481
|
+
var envSlice = createSlice2({
|
|
2554
2482
|
name: "env",
|
|
2555
2483
|
initialState: initialState2,
|
|
2556
2484
|
reducers: {
|
|
@@ -2597,7 +2525,7 @@ var {
|
|
|
2597
2525
|
var env_slice_default = envSlice.reducer;
|
|
2598
2526
|
|
|
2599
2527
|
// src/store/reducers/excel-slice/index.ts
|
|
2600
|
-
|
|
2528
|
+
import { createSlice as createSlice3 } from "@reduxjs/toolkit";
|
|
2601
2529
|
var initialState3 = {
|
|
2602
2530
|
dataParse: null,
|
|
2603
2531
|
idFile: null,
|
|
@@ -2606,7 +2534,7 @@ var initialState3 = {
|
|
|
2606
2534
|
selectedFile: null,
|
|
2607
2535
|
errorData: null
|
|
2608
2536
|
};
|
|
2609
|
-
var excelSlice = (
|
|
2537
|
+
var excelSlice = createSlice3({
|
|
2610
2538
|
name: "excel",
|
|
2611
2539
|
initialState: initialState3,
|
|
2612
2540
|
reducers: {
|
|
@@ -2641,7 +2569,7 @@ var {
|
|
|
2641
2569
|
var excel_slice_default = excelSlice.reducer;
|
|
2642
2570
|
|
|
2643
2571
|
// src/store/reducers/form-slice/index.ts
|
|
2644
|
-
|
|
2572
|
+
import { createSlice as createSlice4 } from "@reduxjs/toolkit";
|
|
2645
2573
|
var initialState4 = {
|
|
2646
2574
|
viewDataStore: {},
|
|
2647
2575
|
isShowingModalDetail: false,
|
|
@@ -2651,7 +2579,7 @@ var initialState4 = {
|
|
|
2651
2579
|
listSubject: {},
|
|
2652
2580
|
dataUser: {}
|
|
2653
2581
|
};
|
|
2654
|
-
var formSlice = (
|
|
2582
|
+
var formSlice = createSlice4({
|
|
2655
2583
|
name: "form",
|
|
2656
2584
|
initialState: initialState4,
|
|
2657
2585
|
reducers: {
|
|
@@ -2690,15 +2618,15 @@ var {
|
|
|
2690
2618
|
var form_slice_default = formSlice.reducer;
|
|
2691
2619
|
|
|
2692
2620
|
// src/store/reducers/header-slice/index.ts
|
|
2693
|
-
|
|
2694
|
-
var headerSlice = (
|
|
2621
|
+
import { createSlice as createSlice5 } from "@reduxjs/toolkit";
|
|
2622
|
+
var headerSlice = createSlice5({
|
|
2695
2623
|
name: "header",
|
|
2696
2624
|
initialState: {
|
|
2697
2625
|
value: { allowedCompanyIds: [] }
|
|
2698
2626
|
},
|
|
2699
2627
|
reducers: {
|
|
2700
2628
|
setHeader: (state, action) => {
|
|
2701
|
-
state.value = {
|
|
2629
|
+
state.value = __spreadValues(__spreadValues({}, state.value), action.payload);
|
|
2702
2630
|
},
|
|
2703
2631
|
setAllowedCompanyIds: (state, action) => {
|
|
2704
2632
|
state.value.allowedCompanyIds = action.payload;
|
|
@@ -2709,7 +2637,7 @@ var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
|
|
|
2709
2637
|
var header_slice_default = headerSlice.reducer;
|
|
2710
2638
|
|
|
2711
2639
|
// src/store/reducers/list-slice/index.ts
|
|
2712
|
-
|
|
2640
|
+
import { createSlice as createSlice6 } from "@reduxjs/toolkit";
|
|
2713
2641
|
var initialState5 = {
|
|
2714
2642
|
pageLimit: 10,
|
|
2715
2643
|
fields: {},
|
|
@@ -2723,7 +2651,7 @@ var initialState5 = {
|
|
|
2723
2651
|
page: 0,
|
|
2724
2652
|
domainTable: []
|
|
2725
2653
|
};
|
|
2726
|
-
var listSlice = (
|
|
2654
|
+
var listSlice = createSlice6({
|
|
2727
2655
|
name: "list",
|
|
2728
2656
|
initialState: initialState5,
|
|
2729
2657
|
reducers: {
|
|
@@ -2774,13 +2702,13 @@ var {
|
|
|
2774
2702
|
var list_slice_default = listSlice.reducer;
|
|
2775
2703
|
|
|
2776
2704
|
// src/store/reducers/login-slice/index.ts
|
|
2777
|
-
|
|
2705
|
+
import { createSlice as createSlice7 } from "@reduxjs/toolkit";
|
|
2778
2706
|
var initialState6 = {
|
|
2779
2707
|
db: "",
|
|
2780
2708
|
redirectTo: "/",
|
|
2781
2709
|
forgotPasswordUrl: "/"
|
|
2782
2710
|
};
|
|
2783
|
-
var loginSlice = (
|
|
2711
|
+
var loginSlice = createSlice7({
|
|
2784
2712
|
name: "login",
|
|
2785
2713
|
initialState: initialState6,
|
|
2786
2714
|
reducers: {
|
|
@@ -2799,14 +2727,14 @@ var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
|
|
|
2799
2727
|
var login_slice_default = loginSlice.reducer;
|
|
2800
2728
|
|
|
2801
2729
|
// src/store/reducers/navbar-slice/index.ts
|
|
2802
|
-
|
|
2730
|
+
import { createSlice as createSlice8 } from "@reduxjs/toolkit";
|
|
2803
2731
|
var initialState7 = {
|
|
2804
2732
|
menuFocus: {},
|
|
2805
2733
|
menuAction: {},
|
|
2806
2734
|
navbarWidth: 250,
|
|
2807
2735
|
menuList: []
|
|
2808
2736
|
};
|
|
2809
|
-
var navbarSlice = (
|
|
2737
|
+
var navbarSlice = createSlice8({
|
|
2810
2738
|
name: "navbar",
|
|
2811
2739
|
initialState: initialState7,
|
|
2812
2740
|
reducers: {
|
|
@@ -2828,11 +2756,11 @@ var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSl
|
|
|
2828
2756
|
var navbar_slice_default = navbarSlice.reducer;
|
|
2829
2757
|
|
|
2830
2758
|
// src/store/reducers/profile-slice/index.ts
|
|
2831
|
-
|
|
2759
|
+
import { createSlice as createSlice9 } from "@reduxjs/toolkit";
|
|
2832
2760
|
var initialState8 = {
|
|
2833
2761
|
profile: {}
|
|
2834
2762
|
};
|
|
2835
|
-
var profileSlice = (
|
|
2763
|
+
var profileSlice = createSlice9({
|
|
2836
2764
|
name: "profile",
|
|
2837
2765
|
initialState: initialState8,
|
|
2838
2766
|
reducers: {
|
|
@@ -2845,7 +2773,7 @@ var { setProfile } = profileSlice.actions;
|
|
|
2845
2773
|
var profile_slice_default = profileSlice.reducer;
|
|
2846
2774
|
|
|
2847
2775
|
// src/store/reducers/search-slice/index.ts
|
|
2848
|
-
|
|
2776
|
+
import { createSlice as createSlice10 } from "@reduxjs/toolkit";
|
|
2849
2777
|
var initialState9 = {
|
|
2850
2778
|
groupByDomain: null,
|
|
2851
2779
|
searchBy: [],
|
|
@@ -2857,7 +2785,7 @@ var initialState9 = {
|
|
|
2857
2785
|
filterBy: [],
|
|
2858
2786
|
groupBy: []
|
|
2859
2787
|
};
|
|
2860
|
-
var searchSlice = (
|
|
2788
|
+
var searchSlice = createSlice10({
|
|
2861
2789
|
name: "search",
|
|
2862
2790
|
initialState: initialState9,
|
|
2863
2791
|
reducers: {
|
|
@@ -2931,7 +2859,7 @@ var {
|
|
|
2931
2859
|
var search_slice_default = searchSlice.reducer;
|
|
2932
2860
|
|
|
2933
2861
|
// src/store/store.ts
|
|
2934
|
-
|
|
2862
|
+
import { configureStore } from "@reduxjs/toolkit";
|
|
2935
2863
|
|
|
2936
2864
|
// node_modules/redux/dist/redux.mjs
|
|
2937
2865
|
function formatProdErrorMessage(code) {
|
|
@@ -3115,7 +3043,7 @@ var rootReducer = combineReducers({
|
|
|
3115
3043
|
excel: excel_slice_default,
|
|
3116
3044
|
profile: profile_slice_default
|
|
3117
3045
|
});
|
|
3118
|
-
var envStore =
|
|
3046
|
+
var envStore = configureStore({
|
|
3119
3047
|
reducer: rootReducer,
|
|
3120
3048
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
3121
3049
|
serializableCheck: false
|
|
@@ -3124,18 +3052,6 @@ var envStore = (0, import_toolkit11.configureStore)({
|
|
|
3124
3052
|
|
|
3125
3053
|
// src/environment/EnvStore.ts
|
|
3126
3054
|
var EnvStore = class {
|
|
3127
|
-
envStore;
|
|
3128
|
-
baseUrl;
|
|
3129
|
-
requests;
|
|
3130
|
-
context;
|
|
3131
|
-
defaultCompany;
|
|
3132
|
-
config;
|
|
3133
|
-
companies;
|
|
3134
|
-
user;
|
|
3135
|
-
db;
|
|
3136
|
-
localStorageUtils;
|
|
3137
|
-
sessionStorageUtils;
|
|
3138
|
-
refreshTokenEndpoint;
|
|
3139
3055
|
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3140
3056
|
this.envStore = envStore2;
|
|
3141
3057
|
this.localStorageUtils = localStorageUtils2;
|
|
@@ -3144,25 +3060,24 @@ var EnvStore = class {
|
|
|
3144
3060
|
}
|
|
3145
3061
|
setup() {
|
|
3146
3062
|
const env2 = this.envStore.getState().env;
|
|
3147
|
-
this.baseUrl = env2
|
|
3148
|
-
this.requests = env2
|
|
3149
|
-
this.context = env2
|
|
3150
|
-
this.defaultCompany = env2
|
|
3151
|
-
this.config = env2
|
|
3152
|
-
this.companies = env2
|
|
3153
|
-
this.user = env2
|
|
3154
|
-
this.db = env2
|
|
3155
|
-
this.refreshTokenEndpoint = env2
|
|
3063
|
+
this.baseUrl = env2 == null ? void 0 : env2.baseUrl;
|
|
3064
|
+
this.requests = env2 == null ? void 0 : env2.requests;
|
|
3065
|
+
this.context = env2 == null ? void 0 : env2.context;
|
|
3066
|
+
this.defaultCompany = env2 == null ? void 0 : env2.defaultCompany;
|
|
3067
|
+
this.config = env2 == null ? void 0 : env2.config;
|
|
3068
|
+
this.companies = (env2 == null ? void 0 : env2.companies) || [];
|
|
3069
|
+
this.user = env2 == null ? void 0 : env2.user;
|
|
3070
|
+
this.db = env2 == null ? void 0 : env2.db;
|
|
3071
|
+
this.refreshTokenEndpoint = env2 == null ? void 0 : env2.refreshTokenEndpoint;
|
|
3156
3072
|
}
|
|
3157
3073
|
setupEnv(envConfig) {
|
|
3158
3074
|
const dispatch = this.envStore.dispatch;
|
|
3159
|
-
const env2 = {
|
|
3160
|
-
...envConfig,
|
|
3075
|
+
const env2 = __spreadProps(__spreadValues({}, envConfig), {
|
|
3161
3076
|
localStorageUtils: this.localStorageUtils,
|
|
3162
3077
|
sessionStorageUtils: this.sessionStorageUtils
|
|
3163
|
-
};
|
|
3078
|
+
});
|
|
3164
3079
|
const requests = axiosClient.init(env2);
|
|
3165
|
-
dispatch(setEnv({
|
|
3080
|
+
dispatch(setEnv(__spreadProps(__spreadValues({}, env2), { requests })));
|
|
3166
3081
|
this.setup();
|
|
3167
3082
|
}
|
|
3168
3083
|
setUid(uid) {
|
|
@@ -3206,35 +3121,61 @@ function getEnv() {
|
|
|
3206
3121
|
// src/services/action-service/index.ts
|
|
3207
3122
|
var ActionService = {
|
|
3208
3123
|
// Load Action
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
}
|
|
3124
|
+
loadAction(_0) {
|
|
3125
|
+
return __async(this, arguments, function* ({
|
|
3126
|
+
idAction,
|
|
3127
|
+
context
|
|
3128
|
+
}) {
|
|
3129
|
+
const env2 = getEnv();
|
|
3130
|
+
const jsonData = {
|
|
3131
|
+
action_id: idAction,
|
|
3132
|
+
with_context: __spreadValues({}, context)
|
|
3133
|
+
};
|
|
3134
|
+
return env2.requests.post(`${"/load_action" /* LOAD_ACTION */}`, jsonData, {
|
|
3135
|
+
headers: {
|
|
3136
|
+
"Content-Type": "application/json"
|
|
3137
|
+
}
|
|
3138
|
+
});
|
|
3224
3139
|
});
|
|
3225
3140
|
},
|
|
3226
3141
|
// Call Button
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3142
|
+
callButton(_0) {
|
|
3143
|
+
return __async(this, arguments, function* ({
|
|
3144
|
+
model,
|
|
3145
|
+
ids = [],
|
|
3146
|
+
context,
|
|
3147
|
+
method
|
|
3148
|
+
}) {
|
|
3149
|
+
try {
|
|
3150
|
+
const env2 = getEnv();
|
|
3151
|
+
const jsonData = {
|
|
3152
|
+
model,
|
|
3153
|
+
method,
|
|
3154
|
+
ids,
|
|
3155
|
+
with_context: context
|
|
3156
|
+
};
|
|
3157
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3158
|
+
headers: {
|
|
3159
|
+
"Content-Type": "application/json"
|
|
3160
|
+
}
|
|
3161
|
+
});
|
|
3162
|
+
} catch (error) {
|
|
3163
|
+
console.error("Error when calling button action:", error);
|
|
3164
|
+
throw error;
|
|
3165
|
+
}
|
|
3166
|
+
});
|
|
3167
|
+
},
|
|
3168
|
+
// remove Row
|
|
3169
|
+
removeRows(_0) {
|
|
3170
|
+
return __async(this, arguments, function* ({
|
|
3171
|
+
model,
|
|
3172
|
+
ids,
|
|
3173
|
+
context
|
|
3174
|
+
}) {
|
|
3234
3175
|
const env2 = getEnv();
|
|
3235
3176
|
const jsonData = {
|
|
3236
3177
|
model,
|
|
3237
|
-
method,
|
|
3178
|
+
method: "unlink",
|
|
3238
3179
|
ids,
|
|
3239
3180
|
with_context: context
|
|
3240
3181
|
};
|
|
@@ -3243,112 +3184,96 @@ var ActionService = {
|
|
|
3243
3184
|
"Content-Type": "application/json"
|
|
3244
3185
|
}
|
|
3245
3186
|
});
|
|
3246
|
-
} catch (error) {
|
|
3247
|
-
console.error("Error when calling button action:", error);
|
|
3248
|
-
throw error;
|
|
3249
|
-
}
|
|
3250
|
-
},
|
|
3251
|
-
// remove Row
|
|
3252
|
-
async removeRows({
|
|
3253
|
-
model,
|
|
3254
|
-
ids,
|
|
3255
|
-
context
|
|
3256
|
-
}) {
|
|
3257
|
-
const env2 = getEnv();
|
|
3258
|
-
const jsonData = {
|
|
3259
|
-
model,
|
|
3260
|
-
method: "unlink",
|
|
3261
|
-
ids,
|
|
3262
|
-
with_context: context
|
|
3263
|
-
};
|
|
3264
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3265
|
-
headers: {
|
|
3266
|
-
"Content-Type": "application/json"
|
|
3267
|
-
}
|
|
3268
3187
|
});
|
|
3269
3188
|
},
|
|
3270
3189
|
// Duplicate Model
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
id,
|
|
3274
|
-
context
|
|
3275
|
-
}) {
|
|
3276
|
-
const env2 = getEnv();
|
|
3277
|
-
const jsonData = {
|
|
3190
|
+
duplicateRecord(_0) {
|
|
3191
|
+
return __async(this, arguments, function* ({
|
|
3278
3192
|
model,
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3193
|
+
id,
|
|
3194
|
+
context
|
|
3195
|
+
}) {
|
|
3196
|
+
const env2 = getEnv();
|
|
3197
|
+
const jsonData = {
|
|
3198
|
+
model,
|
|
3199
|
+
method: "copy",
|
|
3200
|
+
ids: id,
|
|
3201
|
+
with_context: context
|
|
3202
|
+
};
|
|
3203
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3204
|
+
headers: {
|
|
3205
|
+
"Content-Type": "application/json"
|
|
3206
|
+
}
|
|
3207
|
+
});
|
|
3287
3208
|
});
|
|
3288
3209
|
},
|
|
3289
3210
|
// Get Print Report
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3211
|
+
getPrintReportName(_0) {
|
|
3212
|
+
return __async(this, arguments, function* ({ id }) {
|
|
3213
|
+
const env2 = getEnv();
|
|
3214
|
+
const jsonData = {
|
|
3215
|
+
model: "ir.actions.report",
|
|
3216
|
+
method: "web_read",
|
|
3217
|
+
id,
|
|
3218
|
+
kwargs: {
|
|
3219
|
+
specification: {
|
|
3220
|
+
report_name: {}
|
|
3221
|
+
}
|
|
3299
3222
|
}
|
|
3300
|
-
}
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
}
|
|
3223
|
+
};
|
|
3224
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3225
|
+
headers: {
|
|
3226
|
+
"Content-Type": "application/json"
|
|
3227
|
+
}
|
|
3228
|
+
});
|
|
3306
3229
|
});
|
|
3307
3230
|
},
|
|
3308
3231
|
//Save Print Invoice
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3232
|
+
print(_0) {
|
|
3233
|
+
return __async(this, arguments, function* ({ id, report, db }) {
|
|
3234
|
+
const env2 = getEnv();
|
|
3235
|
+
const jsonData = {
|
|
3236
|
+
report,
|
|
3237
|
+
id,
|
|
3238
|
+
type: "pdf",
|
|
3239
|
+
file_response: true,
|
|
3240
|
+
db
|
|
3241
|
+
};
|
|
3242
|
+
const queryString = toQueryString(jsonData);
|
|
3243
|
+
const urlWithParams = `${"/report" /* REPORT_PATH */}?${queryString}`;
|
|
3244
|
+
return env2.requests.get(urlWithParams, {
|
|
3245
|
+
headers: {
|
|
3246
|
+
"Content-Type": "application/json"
|
|
3247
|
+
},
|
|
3248
|
+
responseType: "arraybuffer"
|
|
3249
|
+
});
|
|
3325
3250
|
});
|
|
3326
3251
|
},
|
|
3327
3252
|
//Run Action
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
}
|
|
3253
|
+
runAction(_0) {
|
|
3254
|
+
return __async(this, arguments, function* ({
|
|
3255
|
+
idAction,
|
|
3256
|
+
context
|
|
3257
|
+
}) {
|
|
3258
|
+
const env2 = getEnv();
|
|
3259
|
+
const jsonData = {
|
|
3260
|
+
action_id: idAction,
|
|
3261
|
+
with_context: __spreadValues({}, context)
|
|
3262
|
+
// context: {
|
|
3263
|
+
// lang: 'en_US',
|
|
3264
|
+
// tz: 'Asia/Saigon',
|
|
3265
|
+
// uid: 2,
|
|
3266
|
+
// allowed_company_ids: [1],
|
|
3267
|
+
// active_id: Array.isArray(idDetail) ? idDetail[0] : idDetail,
|
|
3268
|
+
// active_ids: Array.isArray(idDetail) ? [...idDetail] : idDetail,
|
|
3269
|
+
// active_model: model,
|
|
3270
|
+
// },
|
|
3271
|
+
};
|
|
3272
|
+
return env2.requests.post(`${"/run_action" /* RUN_ACTION_PATH */}`, jsonData, {
|
|
3273
|
+
headers: {
|
|
3274
|
+
"Content-Type": "application/json"
|
|
3275
|
+
}
|
|
3276
|
+
});
|
|
3352
3277
|
});
|
|
3353
3278
|
}
|
|
3354
3279
|
};
|
|
@@ -3356,200 +3281,238 @@ var action_service_default = ActionService;
|
|
|
3356
3281
|
|
|
3357
3282
|
// src/services/auth-service/index.ts
|
|
3358
3283
|
var AuthService = {
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3284
|
+
login(body) {
|
|
3285
|
+
return __async(this, null, function* () {
|
|
3286
|
+
var _a, _b, _c, _d;
|
|
3287
|
+
const env2 = getEnv();
|
|
3288
|
+
const payload = Object.fromEntries(
|
|
3289
|
+
Object.entries({
|
|
3290
|
+
username: body.email,
|
|
3291
|
+
password: body.password,
|
|
3292
|
+
grant_type: ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.grantType) || "",
|
|
3293
|
+
client_id: ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.clientId) || "",
|
|
3294
|
+
client_secret: ((_c = env2 == null ? void 0 : env2.config) == null ? void 0 : _c.clientSecret) || ""
|
|
3295
|
+
}).filter(([_, value]) => !!value)
|
|
3296
|
+
);
|
|
3297
|
+
const encodedData = new URLSearchParams(payload).toString();
|
|
3298
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(body.path, encodedData, {
|
|
3299
|
+
headers: {
|
|
3300
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3301
|
+
}
|
|
3302
|
+
});
|
|
3375
3303
|
});
|
|
3376
3304
|
},
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3305
|
+
forgotPassword(email) {
|
|
3306
|
+
return __async(this, null, function* () {
|
|
3307
|
+
var _a;
|
|
3308
|
+
const env2 = getEnv();
|
|
3309
|
+
const bodyData = {
|
|
3310
|
+
login: email,
|
|
3311
|
+
url: `${window.location.origin}/reset-password`
|
|
3312
|
+
};
|
|
3313
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
3314
|
+
headers: {
|
|
3315
|
+
"Content-Type": "application/json"
|
|
3316
|
+
}
|
|
3317
|
+
});
|
|
3387
3318
|
});
|
|
3388
3319
|
},
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3320
|
+
forgotPasswordSSO(_0) {
|
|
3321
|
+
return __async(this, arguments, function* ({
|
|
3322
|
+
email,
|
|
3323
|
+
with_context,
|
|
3324
|
+
method
|
|
3325
|
+
}) {
|
|
3326
|
+
var _a;
|
|
3327
|
+
const env2 = getEnv();
|
|
3328
|
+
const body = {
|
|
3329
|
+
method,
|
|
3330
|
+
kwargs: {
|
|
3331
|
+
vals: {
|
|
3332
|
+
email
|
|
3333
|
+
}
|
|
3334
|
+
},
|
|
3335
|
+
with_context
|
|
3336
|
+
};
|
|
3337
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, body, {
|
|
3338
|
+
headers: {
|
|
3339
|
+
"Content-Type": "application/json"
|
|
3400
3340
|
}
|
|
3401
|
-
}
|
|
3402
|
-
with_context
|
|
3403
|
-
};
|
|
3404
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
3405
|
-
headers: {
|
|
3406
|
-
"Content-Type": "application/json"
|
|
3407
|
-
}
|
|
3341
|
+
});
|
|
3408
3342
|
});
|
|
3409
3343
|
},
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3344
|
+
resetPassword(data, token) {
|
|
3345
|
+
return __async(this, null, function* () {
|
|
3346
|
+
var _a;
|
|
3347
|
+
const env2 = getEnv();
|
|
3348
|
+
const bodyData = {
|
|
3349
|
+
token,
|
|
3350
|
+
password: data.password,
|
|
3351
|
+
new_password: data.confirmPassword
|
|
3352
|
+
};
|
|
3353
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
3354
|
+
headers: {
|
|
3355
|
+
"Content-Type": "application/json"
|
|
3356
|
+
}
|
|
3357
|
+
});
|
|
3421
3358
|
});
|
|
3422
3359
|
},
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
password,
|
|
3426
|
-
with_context
|
|
3427
|
-
}) {
|
|
3428
|
-
const env2 = getEnv();
|
|
3429
|
-
const bodyData = {
|
|
3360
|
+
resetPasswordSSO(_0) {
|
|
3361
|
+
return __async(this, arguments, function* ({
|
|
3430
3362
|
method,
|
|
3431
|
-
|
|
3432
|
-
vals: {
|
|
3433
|
-
password
|
|
3434
|
-
}
|
|
3435
|
-
},
|
|
3363
|
+
password,
|
|
3436
3364
|
with_context
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
}
|
|
3365
|
+
}) {
|
|
3366
|
+
var _a;
|
|
3367
|
+
const env2 = getEnv();
|
|
3368
|
+
const bodyData = {
|
|
3369
|
+
method,
|
|
3370
|
+
kwargs: {
|
|
3371
|
+
vals: {
|
|
3372
|
+
password
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
with_context
|
|
3376
|
+
};
|
|
3377
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, bodyData, {
|
|
3378
|
+
headers: {
|
|
3379
|
+
"Content-Type": "application/json"
|
|
3380
|
+
}
|
|
3381
|
+
});
|
|
3455
3382
|
});
|
|
3456
3383
|
},
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
}
|
|
3384
|
+
updatePassword(data, token) {
|
|
3385
|
+
return __async(this, null, function* () {
|
|
3386
|
+
var _a;
|
|
3387
|
+
const env2 = getEnv();
|
|
3388
|
+
const bodyData = {
|
|
3389
|
+
token,
|
|
3390
|
+
old_password: data.oldPassword,
|
|
3391
|
+
new_password: data.newPassword
|
|
3392
|
+
};
|
|
3393
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
3394
|
+
headers: {
|
|
3395
|
+
"Content-Type": "application/json"
|
|
3396
|
+
}
|
|
3397
|
+
});
|
|
3466
3398
|
});
|
|
3467
3399
|
},
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
"/
|
|
3476
|
-
{ state, access_token },
|
|
3477
|
-
{
|
|
3400
|
+
isValidToken(token) {
|
|
3401
|
+
return __async(this, null, function* () {
|
|
3402
|
+
var _a;
|
|
3403
|
+
const env2 = getEnv();
|
|
3404
|
+
const bodyData = {
|
|
3405
|
+
token
|
|
3406
|
+
};
|
|
3407
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/check_token" /* TOKEN */, bodyData, {
|
|
3478
3408
|
headers: {
|
|
3479
3409
|
"Content-Type": "application/json"
|
|
3480
3410
|
}
|
|
3481
|
-
}
|
|
3482
|
-
);
|
|
3411
|
+
});
|
|
3412
|
+
});
|
|
3483
3413
|
},
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3414
|
+
loginSocial(_0) {
|
|
3415
|
+
return __async(this, arguments, function* ({
|
|
3416
|
+
db,
|
|
3417
|
+
state,
|
|
3418
|
+
access_token
|
|
3419
|
+
}) {
|
|
3420
|
+
var _a;
|
|
3421
|
+
const env2 = getEnv();
|
|
3422
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3423
|
+
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3424
|
+
{ state, access_token },
|
|
3425
|
+
{
|
|
3426
|
+
headers: {
|
|
3427
|
+
"Content-Type": "application/json"
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
);
|
|
3431
|
+
});
|
|
3487
3432
|
},
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3433
|
+
getProviders(db) {
|
|
3434
|
+
return __async(this, null, function* () {
|
|
3435
|
+
var _a;
|
|
3436
|
+
const env2 = getEnv();
|
|
3437
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("/oauth/providers", { params: { db } });
|
|
3438
|
+
});
|
|
3439
|
+
},
|
|
3440
|
+
getAccessByCode(code) {
|
|
3441
|
+
return __async(this, null, function* () {
|
|
3442
|
+
var _a, _b, _c, _d;
|
|
3443
|
+
const env2 = getEnv();
|
|
3444
|
+
const data = new URLSearchParams();
|
|
3445
|
+
data.append("code", code);
|
|
3446
|
+
data.append("grant_type", "authorization_code");
|
|
3447
|
+
data.append("client_id", ((_a = env2 == null ? void 0 : env2.config) == null ? void 0 : _a.clientId) || "");
|
|
3448
|
+
data.append("redirect_uri", ((_b = env2 == null ? void 0 : env2.config) == null ? void 0 : _b.redirectUri) || "");
|
|
3449
|
+
return (_d = env2 == null ? void 0 : env2.requests) == null ? void 0 : _d.post(
|
|
3450
|
+
`${(_c = env2 == null ? void 0 : env2.baseUrl) == null ? void 0 : _c.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3451
|
+
data,
|
|
3452
|
+
{
|
|
3453
|
+
headers: {
|
|
3454
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3455
|
+
}
|
|
3501
3456
|
}
|
|
3502
|
-
|
|
3503
|
-
);
|
|
3457
|
+
);
|
|
3458
|
+
});
|
|
3504
3459
|
},
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3460
|
+
logout(data) {
|
|
3461
|
+
return __async(this, null, function* () {
|
|
3462
|
+
var _a;
|
|
3463
|
+
const env2 = getEnv();
|
|
3464
|
+
console.log(data);
|
|
3465
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(
|
|
3466
|
+
"/logout" /* LOGOUT */,
|
|
3467
|
+
{},
|
|
3468
|
+
{
|
|
3469
|
+
headers: {
|
|
3470
|
+
"Content-Type": "application/json"
|
|
3471
|
+
},
|
|
3472
|
+
withCredentials: true,
|
|
3473
|
+
useRefreshToken: true
|
|
3474
|
+
}
|
|
3475
|
+
);
|
|
3476
|
+
});
|
|
3519
3477
|
}
|
|
3520
3478
|
};
|
|
3521
3479
|
var auth_service_default = AuthService;
|
|
3522
3480
|
|
|
3523
3481
|
// src/services/company-service/index.ts
|
|
3524
3482
|
var CompanyService = {
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3483
|
+
getCurrentCompany() {
|
|
3484
|
+
return __async(this, null, function* () {
|
|
3485
|
+
const env2 = getEnv();
|
|
3486
|
+
return yield env2.requests.get("/company" /* COMPANY_PATH */, {
|
|
3487
|
+
headers: {
|
|
3488
|
+
"Content-Type": "application/json"
|
|
3489
|
+
}
|
|
3490
|
+
});
|
|
3531
3491
|
});
|
|
3532
3492
|
},
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3493
|
+
getInfoCompany(id) {
|
|
3494
|
+
return __async(this, null, function* () {
|
|
3495
|
+
var _a;
|
|
3496
|
+
const env2 = getEnv();
|
|
3497
|
+
const jsonData = {
|
|
3498
|
+
ids: [id],
|
|
3499
|
+
model: "res.company" /* COMPANY */,
|
|
3500
|
+
method: "web_read" /* WEB_READ */,
|
|
3501
|
+
kwargs: {
|
|
3502
|
+
specification: {
|
|
3503
|
+
primary_color: {},
|
|
3504
|
+
secondary_color: {},
|
|
3505
|
+
logo: {},
|
|
3506
|
+
display_name: {},
|
|
3507
|
+
secondary_logo: {}
|
|
3508
|
+
}
|
|
3546
3509
|
}
|
|
3547
|
-
}
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
}
|
|
3510
|
+
};
|
|
3511
|
+
return yield (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
3512
|
+
headers: {
|
|
3513
|
+
"Content-Type": "application/json"
|
|
3514
|
+
}
|
|
3515
|
+
});
|
|
3553
3516
|
});
|
|
3554
3517
|
}
|
|
3555
3518
|
};
|
|
@@ -3557,300 +3520,328 @@ var company_service_default = CompanyService;
|
|
|
3557
3520
|
|
|
3558
3521
|
// src/services/excel-service/index.ts
|
|
3559
3522
|
var ExcelService = {
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
});
|
|
3567
|
-
},
|
|
3568
|
-
async uploadIdFile({ formData }) {
|
|
3569
|
-
const env2 = getEnv();
|
|
3570
|
-
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3571
|
-
headers: {
|
|
3572
|
-
"Content-Type": "multipart/form-data"
|
|
3573
|
-
}
|
|
3574
|
-
});
|
|
3575
|
-
},
|
|
3576
|
-
async parsePreview({
|
|
3577
|
-
id,
|
|
3578
|
-
selectedSheet,
|
|
3579
|
-
isHeader,
|
|
3580
|
-
context
|
|
3581
|
-
}) {
|
|
3582
|
-
const env2 = getEnv();
|
|
3583
|
-
const jsonData = {
|
|
3584
|
-
model: "base_import.import" /* BASE_IMPORT */,
|
|
3585
|
-
method: "parse_preview",
|
|
3586
|
-
ids: [id],
|
|
3587
|
-
kwargs: {
|
|
3588
|
-
options: {
|
|
3589
|
-
import_skip_records: [],
|
|
3590
|
-
import_set_empty_fields: [],
|
|
3591
|
-
fallback_values: {},
|
|
3592
|
-
name_create_enabled_fields: {},
|
|
3593
|
-
encoding: "",
|
|
3594
|
-
separator: "",
|
|
3595
|
-
quoting: '"',
|
|
3596
|
-
date_format: "",
|
|
3597
|
-
datetime_format: "",
|
|
3598
|
-
float_thousand_separator: ",",
|
|
3599
|
-
float_decimal_separator: ".",
|
|
3600
|
-
advanced: true,
|
|
3601
|
-
has_headers: isHeader,
|
|
3602
|
-
keep_matches: false,
|
|
3603
|
-
limit: 2e3,
|
|
3604
|
-
sheets: [],
|
|
3605
|
-
sheet: selectedSheet,
|
|
3606
|
-
skip: 0,
|
|
3607
|
-
tracking_disable: true
|
|
3523
|
+
uploadFile(_0) {
|
|
3524
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3525
|
+
const env2 = getEnv();
|
|
3526
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3527
|
+
headers: {
|
|
3528
|
+
"Content-Type": "multipart/form-data"
|
|
3608
3529
|
}
|
|
3609
|
-
}
|
|
3610
|
-
with_context: context
|
|
3611
|
-
};
|
|
3612
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3613
|
-
headers: {
|
|
3614
|
-
"Content-Type": "multipart/form-data"
|
|
3615
|
-
}
|
|
3530
|
+
});
|
|
3616
3531
|
});
|
|
3617
3532
|
},
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
const env2 = getEnv();
|
|
3627
|
-
const jsonData = {
|
|
3628
|
-
model: "base_import.import" /* BASE_IMPORT */,
|
|
3629
|
-
method: "execute_import",
|
|
3630
|
-
ids: [idFile],
|
|
3631
|
-
kwargs: {
|
|
3632
|
-
fields,
|
|
3633
|
-
columns,
|
|
3634
|
-
options,
|
|
3635
|
-
dryrun
|
|
3636
|
-
},
|
|
3637
|
-
with_context: context
|
|
3638
|
-
};
|
|
3639
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3640
|
-
headers: {
|
|
3641
|
-
"Content-Type": "multipart/form-data"
|
|
3642
|
-
}
|
|
3533
|
+
uploadIdFile(_0) {
|
|
3534
|
+
return __async(this, arguments, function* ({ formData }) {
|
|
3535
|
+
const env2 = getEnv();
|
|
3536
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3537
|
+
headers: {
|
|
3538
|
+
"Content-Type": "multipart/form-data"
|
|
3539
|
+
}
|
|
3540
|
+
});
|
|
3643
3541
|
});
|
|
3644
3542
|
},
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
}
|
|
3652
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3653
|
-
},
|
|
3654
|
-
async getFieldExport({
|
|
3655
|
-
ids,
|
|
3656
|
-
model,
|
|
3657
|
-
isShow,
|
|
3658
|
-
parentField,
|
|
3659
|
-
fieldType,
|
|
3660
|
-
parentName,
|
|
3661
|
-
prefix,
|
|
3662
|
-
name,
|
|
3663
|
-
context,
|
|
3664
|
-
importCompat
|
|
3665
|
-
}) {
|
|
3666
|
-
const env2 = getEnv();
|
|
3667
|
-
const jsonData = {
|
|
3668
|
-
model,
|
|
3669
|
-
import_compat: importCompat,
|
|
3670
|
-
domain: [["id", "in", ids]],
|
|
3671
|
-
with_context: context
|
|
3672
|
-
};
|
|
3673
|
-
if (isShow) {
|
|
3674
|
-
jsonData.parent_field = parentField;
|
|
3675
|
-
jsonData.parent_field_type = fieldType;
|
|
3676
|
-
jsonData.parent_name = parentName;
|
|
3677
|
-
jsonData.name = name;
|
|
3678
|
-
jsonData.prefix = prefix;
|
|
3679
|
-
jsonData.exclude = [null];
|
|
3680
|
-
}
|
|
3681
|
-
return env2.requests.post("/export/get_fields", jsonData);
|
|
3682
|
-
},
|
|
3683
|
-
async exportExcel({
|
|
3684
|
-
model,
|
|
3685
|
-
domain,
|
|
3686
|
-
ids,
|
|
3687
|
-
fields,
|
|
3688
|
-
type,
|
|
3689
|
-
importCompat,
|
|
3690
|
-
context,
|
|
3691
|
-
groupby
|
|
3692
|
-
}) {
|
|
3693
|
-
const env2 = getEnv();
|
|
3694
|
-
const jsonData = {
|
|
3695
|
-
model,
|
|
3696
|
-
domain,
|
|
3697
|
-
ids,
|
|
3698
|
-
import_compat: importCompat,
|
|
3699
|
-
fields,
|
|
3700
|
-
with_context: context,
|
|
3701
|
-
groupby: groupby ?? []
|
|
3702
|
-
};
|
|
3703
|
-
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3704
|
-
}
|
|
3705
|
-
};
|
|
3706
|
-
var excel_service_default = ExcelService;
|
|
3707
|
-
|
|
3708
|
-
// src/services/form-service/index.ts
|
|
3709
|
-
var FormService = {
|
|
3710
|
-
async getComment({ data }) {
|
|
3711
|
-
try {
|
|
3543
|
+
parsePreview(_0) {
|
|
3544
|
+
return __async(this, arguments, function* ({
|
|
3545
|
+
id,
|
|
3546
|
+
selectedSheet,
|
|
3547
|
+
isHeader,
|
|
3548
|
+
context
|
|
3549
|
+
}) {
|
|
3712
3550
|
const env2 = getEnv();
|
|
3713
3551
|
const jsonData = {
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3552
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3553
|
+
method: "parse_preview",
|
|
3554
|
+
ids: [id],
|
|
3555
|
+
kwargs: {
|
|
3556
|
+
options: {
|
|
3557
|
+
import_skip_records: [],
|
|
3558
|
+
import_set_empty_fields: [],
|
|
3559
|
+
fallback_values: {},
|
|
3560
|
+
name_create_enabled_fields: {},
|
|
3561
|
+
encoding: "",
|
|
3562
|
+
separator: "",
|
|
3563
|
+
quoting: '"',
|
|
3564
|
+
date_format: "",
|
|
3565
|
+
datetime_format: "",
|
|
3566
|
+
float_thousand_separator: ",",
|
|
3567
|
+
float_decimal_separator: ".",
|
|
3568
|
+
advanced: true,
|
|
3569
|
+
has_headers: isHeader,
|
|
3570
|
+
keep_matches: false,
|
|
3571
|
+
limit: 2e3,
|
|
3572
|
+
sheets: [],
|
|
3573
|
+
sheet: selectedSheet,
|
|
3574
|
+
skip: 0,
|
|
3575
|
+
tracking_disable: true
|
|
3576
|
+
}
|
|
3577
|
+
},
|
|
3578
|
+
with_context: context
|
|
3720
3579
|
};
|
|
3721
|
-
return env2.requests.post("/
|
|
3580
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3722
3581
|
headers: {
|
|
3723
|
-
"Content-Type": "
|
|
3582
|
+
"Content-Type": "multipart/form-data"
|
|
3724
3583
|
}
|
|
3725
3584
|
});
|
|
3726
|
-
}
|
|
3727
|
-
console.error("Error when sending message:", error);
|
|
3728
|
-
throw error;
|
|
3729
|
-
}
|
|
3585
|
+
});
|
|
3730
3586
|
},
|
|
3731
|
-
|
|
3732
|
-
|
|
3587
|
+
executeImport(_0) {
|
|
3588
|
+
return __async(this, arguments, function* ({
|
|
3589
|
+
columns,
|
|
3590
|
+
fields,
|
|
3591
|
+
idFile,
|
|
3592
|
+
options,
|
|
3593
|
+
dryrun,
|
|
3594
|
+
context
|
|
3595
|
+
}) {
|
|
3733
3596
|
const env2 = getEnv();
|
|
3734
3597
|
const jsonData = {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
body: data.message,
|
|
3744
|
-
message_type: "comment",
|
|
3745
|
-
attachment_ids: data.attachment_ids,
|
|
3746
|
-
attachment_tokens: [],
|
|
3747
|
-
subtype_xmlid: data.subtype
|
|
3598
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3599
|
+
method: "execute_import",
|
|
3600
|
+
ids: [idFile],
|
|
3601
|
+
kwargs: {
|
|
3602
|
+
fields,
|
|
3603
|
+
columns,
|
|
3604
|
+
options,
|
|
3605
|
+
dryrun
|
|
3748
3606
|
},
|
|
3749
|
-
|
|
3750
|
-
thread_model: data.thread_model
|
|
3607
|
+
with_context: context
|
|
3751
3608
|
};
|
|
3752
|
-
return env2.requests.post("/
|
|
3609
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3753
3610
|
headers: {
|
|
3754
|
-
"Content-Type": "
|
|
3611
|
+
"Content-Type": "multipart/form-data"
|
|
3755
3612
|
}
|
|
3756
3613
|
});
|
|
3757
|
-
}
|
|
3758
|
-
console.error("Error when sent message:", error);
|
|
3759
|
-
throw error;
|
|
3760
|
-
}
|
|
3614
|
+
});
|
|
3761
3615
|
},
|
|
3762
|
-
|
|
3763
|
-
|
|
3616
|
+
getFileExcel(_0) {
|
|
3617
|
+
return __async(this, arguments, function* ({ model }) {
|
|
3764
3618
|
const env2 = getEnv();
|
|
3765
3619
|
const jsonData = {
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
message_id: data.message_id
|
|
3620
|
+
model,
|
|
3621
|
+
method: "get_import_templates" /* GET_IMPORT */,
|
|
3622
|
+
args: []
|
|
3770
3623
|
};
|
|
3771
|
-
return env2.requests.post("/
|
|
3772
|
-
|
|
3773
|
-
"Content-Type": "application/json"
|
|
3774
|
-
}
|
|
3775
|
-
});
|
|
3776
|
-
} catch (error) {
|
|
3777
|
-
console.error("Error when sent message:", error);
|
|
3778
|
-
throw error;
|
|
3779
|
-
}
|
|
3624
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3625
|
+
});
|
|
3780
3626
|
},
|
|
3781
|
-
|
|
3782
|
-
|
|
3627
|
+
getFieldExport(_0) {
|
|
3628
|
+
return __async(this, arguments, function* ({
|
|
3629
|
+
ids,
|
|
3630
|
+
model,
|
|
3631
|
+
isShow,
|
|
3632
|
+
parentField,
|
|
3633
|
+
fieldType,
|
|
3634
|
+
parentName,
|
|
3635
|
+
prefix,
|
|
3636
|
+
name,
|
|
3637
|
+
context,
|
|
3638
|
+
importCompat
|
|
3639
|
+
}) {
|
|
3783
3640
|
const env2 = getEnv();
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3641
|
+
const jsonData = {
|
|
3642
|
+
model,
|
|
3643
|
+
import_compat: importCompat,
|
|
3644
|
+
domain: [["id", "in", ids]],
|
|
3645
|
+
with_context: context
|
|
3646
|
+
};
|
|
3647
|
+
if (isShow) {
|
|
3648
|
+
jsonData.parent_field = parentField;
|
|
3649
|
+
jsonData.parent_field_type = fieldType;
|
|
3650
|
+
jsonData.parent_name = parentName;
|
|
3651
|
+
jsonData.name = name;
|
|
3652
|
+
jsonData.prefix = prefix;
|
|
3653
|
+
jsonData.exclude = [null];
|
|
3654
|
+
}
|
|
3655
|
+
return env2.requests.post("/export/get_fields", jsonData);
|
|
3656
|
+
});
|
|
3657
|
+
},
|
|
3658
|
+
exportExcel(_0) {
|
|
3659
|
+
return __async(this, arguments, function* ({
|
|
3660
|
+
model,
|
|
3661
|
+
domain,
|
|
3662
|
+
ids,
|
|
3663
|
+
fields,
|
|
3664
|
+
type,
|
|
3665
|
+
importCompat,
|
|
3666
|
+
context,
|
|
3667
|
+
groupby
|
|
3668
|
+
}) {
|
|
3669
|
+
const env2 = getEnv();
|
|
3670
|
+
const jsonData = {
|
|
3671
|
+
model,
|
|
3672
|
+
domain,
|
|
3673
|
+
ids,
|
|
3674
|
+
import_compat: importCompat,
|
|
3675
|
+
fields,
|
|
3676
|
+
with_context: context,
|
|
3677
|
+
groupby: groupby != null ? groupby : []
|
|
3678
|
+
};
|
|
3679
|
+
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3680
|
+
});
|
|
3681
|
+
}
|
|
3682
|
+
};
|
|
3683
|
+
var excel_service_default = ExcelService;
|
|
3684
|
+
|
|
3685
|
+
// src/services/form-service/index.ts
|
|
3686
|
+
var FormService = {
|
|
3687
|
+
getComment(_0) {
|
|
3688
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3689
|
+
try {
|
|
3690
|
+
const env2 = getEnv();
|
|
3691
|
+
const jsonData = {
|
|
3692
|
+
thread_id: data.thread_id,
|
|
3693
|
+
thread_model: data.thread_model,
|
|
3694
|
+
limit: 100,
|
|
3695
|
+
with_context: {
|
|
3696
|
+
lang: data.lang
|
|
3697
|
+
}
|
|
3698
|
+
};
|
|
3699
|
+
return env2.requests.post("/chatter/thread/messages" /* GET_MESSAGE */, jsonData, {
|
|
3787
3700
|
headers: {
|
|
3788
3701
|
"Content-Type": "application/json"
|
|
3789
3702
|
}
|
|
3790
|
-
}
|
|
3791
|
-
)
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
}
|
|
3703
|
+
});
|
|
3704
|
+
} catch (error) {
|
|
3705
|
+
console.error("Error when sending message:", error);
|
|
3706
|
+
throw error;
|
|
3707
|
+
}
|
|
3708
|
+
});
|
|
3796
3709
|
},
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3710
|
+
sentComment(_0) {
|
|
3711
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3712
|
+
try {
|
|
3713
|
+
const env2 = getEnv();
|
|
3714
|
+
const jsonData = {
|
|
3715
|
+
context: {
|
|
3716
|
+
tz: "Asia/Saigon",
|
|
3717
|
+
uid: 2,
|
|
3718
|
+
allowed_company_ids: [1],
|
|
3719
|
+
mail_post_autofollow: false,
|
|
3720
|
+
temporary_id: 142183.01
|
|
3721
|
+
},
|
|
3722
|
+
post_data: {
|
|
3723
|
+
body: data.message,
|
|
3724
|
+
message_type: "comment",
|
|
3725
|
+
attachment_ids: data.attachment_ids,
|
|
3726
|
+
attachment_tokens: [],
|
|
3727
|
+
subtype_xmlid: data.subtype
|
|
3728
|
+
},
|
|
3729
|
+
thread_id: Number(data.thread_id),
|
|
3730
|
+
thread_model: data.thread_model
|
|
3731
|
+
};
|
|
3732
|
+
return env2.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
3733
|
+
headers: {
|
|
3734
|
+
"Content-Type": "application/json"
|
|
3735
|
+
}
|
|
3736
|
+
});
|
|
3737
|
+
} catch (error) {
|
|
3738
|
+
console.error("Error when sent message:", error);
|
|
3739
|
+
throw error;
|
|
3740
|
+
}
|
|
3741
|
+
});
|
|
3809
3742
|
},
|
|
3810
|
-
|
|
3811
|
-
|
|
3743
|
+
deleteComment(_0) {
|
|
3744
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3745
|
+
try {
|
|
3746
|
+
const env2 = getEnv();
|
|
3747
|
+
const jsonData = {
|
|
3748
|
+
attachment_ids: [],
|
|
3749
|
+
attachment_tokens: [],
|
|
3750
|
+
body: "",
|
|
3751
|
+
message_id: data.message_id
|
|
3752
|
+
};
|
|
3753
|
+
return env2.requests.post("/chatter/message/update_content" /* DELETE_MESSAGE */, jsonData, {
|
|
3754
|
+
headers: {
|
|
3755
|
+
"Content-Type": "application/json"
|
|
3756
|
+
}
|
|
3757
|
+
});
|
|
3758
|
+
} catch (error) {
|
|
3759
|
+
console.error("Error when sent message:", error);
|
|
3760
|
+
throw error;
|
|
3761
|
+
}
|
|
3762
|
+
});
|
|
3763
|
+
},
|
|
3764
|
+
getImage(_0) {
|
|
3765
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3766
|
+
try {
|
|
3767
|
+
const env2 = getEnv();
|
|
3768
|
+
return env2.requests.get(
|
|
3769
|
+
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
3770
|
+
{
|
|
3771
|
+
headers: {
|
|
3772
|
+
"Content-Type": "application/json"
|
|
3773
|
+
}
|
|
3774
|
+
}
|
|
3775
|
+
);
|
|
3776
|
+
} catch (error) {
|
|
3777
|
+
console.error("Error when sent message:", error);
|
|
3778
|
+
throw error;
|
|
3779
|
+
}
|
|
3780
|
+
});
|
|
3781
|
+
},
|
|
3782
|
+
uploadImage(_0) {
|
|
3783
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3784
|
+
try {
|
|
3785
|
+
const env2 = getEnv();
|
|
3786
|
+
return env2.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
|
|
3787
|
+
headers: {
|
|
3788
|
+
"Content-Type": "multipart/form-data"
|
|
3789
|
+
}
|
|
3790
|
+
});
|
|
3791
|
+
} catch (error) {
|
|
3792
|
+
console.error("Error when sent message:", error);
|
|
3793
|
+
throw error;
|
|
3794
|
+
}
|
|
3795
|
+
});
|
|
3796
|
+
},
|
|
3797
|
+
getFormView(_0) {
|
|
3798
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3799
|
+
try {
|
|
3800
|
+
const env2 = getEnv();
|
|
3801
|
+
const jsonData = {
|
|
3802
|
+
model: data.model,
|
|
3803
|
+
method: "get_formview_action",
|
|
3804
|
+
ids: data.id ? [data.id] : [],
|
|
3805
|
+
with_context: data.context
|
|
3806
|
+
};
|
|
3807
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3808
|
+
headers: {
|
|
3809
|
+
"Content-Type": "application/json"
|
|
3810
|
+
}
|
|
3811
|
+
});
|
|
3812
|
+
} catch (error) {
|
|
3813
|
+
console.error("Error when fetching form view:", error);
|
|
3814
|
+
throw error;
|
|
3815
|
+
}
|
|
3816
|
+
});
|
|
3817
|
+
},
|
|
3818
|
+
changeStatus(_0) {
|
|
3819
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3812
3820
|
const env2 = getEnv();
|
|
3821
|
+
const vals = {
|
|
3822
|
+
[data.name]: data.stage_id
|
|
3823
|
+
};
|
|
3813
3824
|
const jsonData = {
|
|
3814
3825
|
model: data.model,
|
|
3815
|
-
method: "
|
|
3816
|
-
|
|
3817
|
-
|
|
3826
|
+
method: "web_save",
|
|
3827
|
+
with_context: {
|
|
3828
|
+
lang: data.lang,
|
|
3829
|
+
allowed_company_ids: [1],
|
|
3830
|
+
uid: 2,
|
|
3831
|
+
search_default_my_ticket: true,
|
|
3832
|
+
search_default_is_open: true
|
|
3833
|
+
},
|
|
3834
|
+
ids: [data.id],
|
|
3835
|
+
kwargs: {
|
|
3836
|
+
vals,
|
|
3837
|
+
specification: {}
|
|
3838
|
+
}
|
|
3818
3839
|
};
|
|
3819
3840
|
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3820
3841
|
headers: {
|
|
3821
3842
|
"Content-Type": "application/json"
|
|
3822
3843
|
}
|
|
3823
3844
|
});
|
|
3824
|
-
} catch (error) {
|
|
3825
|
-
console.error("Error when fetching form view:", error);
|
|
3826
|
-
throw error;
|
|
3827
|
-
}
|
|
3828
|
-
},
|
|
3829
|
-
async changeStatus({ data }) {
|
|
3830
|
-
const env2 = getEnv();
|
|
3831
|
-
const vals = {
|
|
3832
|
-
[data.name]: data.stage_id
|
|
3833
|
-
};
|
|
3834
|
-
const jsonData = {
|
|
3835
|
-
model: data.model,
|
|
3836
|
-
method: "web_save",
|
|
3837
|
-
with_context: {
|
|
3838
|
-
lang: data.lang,
|
|
3839
|
-
allowed_company_ids: [1],
|
|
3840
|
-
uid: 2,
|
|
3841
|
-
search_default_my_ticket: true,
|
|
3842
|
-
search_default_is_open: true
|
|
3843
|
-
},
|
|
3844
|
-
ids: [data.id],
|
|
3845
|
-
kwargs: {
|
|
3846
|
-
vals,
|
|
3847
|
-
specification: {}
|
|
3848
|
-
}
|
|
3849
|
-
};
|
|
3850
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3851
|
-
headers: {
|
|
3852
|
-
"Content-Type": "application/json"
|
|
3853
|
-
}
|
|
3854
3845
|
});
|
|
3855
3846
|
}
|
|
3856
3847
|
};
|
|
@@ -3858,51 +3849,55 @@ var form_service_default = FormService;
|
|
|
3858
3849
|
|
|
3859
3850
|
// src/services/kanban-service/index.ts
|
|
3860
3851
|
var KanbanServices = {
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
width_context
|
|
3864
|
-
}) {
|
|
3865
|
-
const env2 = getEnv();
|
|
3866
|
-
const jsonDataView = {
|
|
3852
|
+
getGroups(_0) {
|
|
3853
|
+
return __async(this, arguments, function* ({
|
|
3867
3854
|
model,
|
|
3868
|
-
method: "web_read_group",
|
|
3869
|
-
kwargs: {
|
|
3870
|
-
domain: [["stage_id.fold", "=", false]],
|
|
3871
|
-
fields: ["color:sum"],
|
|
3872
|
-
groupby: ["stage_id"]
|
|
3873
|
-
},
|
|
3874
3855
|
width_context
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3856
|
+
}) {
|
|
3857
|
+
const env2 = getEnv();
|
|
3858
|
+
const jsonDataView = {
|
|
3859
|
+
model,
|
|
3860
|
+
method: "web_read_group",
|
|
3861
|
+
kwargs: {
|
|
3862
|
+
domain: [["stage_id.fold", "=", false]],
|
|
3863
|
+
fields: ["color:sum"],
|
|
3864
|
+
groupby: ["stage_id"]
|
|
3865
|
+
},
|
|
3866
|
+
width_context
|
|
3867
|
+
};
|
|
3868
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3869
|
+
headers: {
|
|
3870
|
+
"Content-Type": "application/json"
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3880
3873
|
});
|
|
3881
3874
|
},
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
width_context
|
|
3887
|
-
}) {
|
|
3888
|
-
const env2 = getEnv();
|
|
3889
|
-
const jsonDataView = {
|
|
3875
|
+
getProgressBar(_0) {
|
|
3876
|
+
return __async(this, arguments, function* ({
|
|
3877
|
+
field,
|
|
3878
|
+
color,
|
|
3890
3879
|
model,
|
|
3891
|
-
method: "read_progress_bar",
|
|
3892
|
-
kwargs: {
|
|
3893
|
-
domain: [],
|
|
3894
|
-
group_by: "stage_id",
|
|
3895
|
-
progress_bar: {
|
|
3896
|
-
colors: color,
|
|
3897
|
-
field
|
|
3898
|
-
}
|
|
3899
|
-
},
|
|
3900
3880
|
width_context
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3881
|
+
}) {
|
|
3882
|
+
const env2 = getEnv();
|
|
3883
|
+
const jsonDataView = {
|
|
3884
|
+
model,
|
|
3885
|
+
method: "read_progress_bar",
|
|
3886
|
+
kwargs: {
|
|
3887
|
+
domain: [],
|
|
3888
|
+
group_by: "stage_id",
|
|
3889
|
+
progress_bar: {
|
|
3890
|
+
colors: color,
|
|
3891
|
+
field
|
|
3892
|
+
}
|
|
3893
|
+
},
|
|
3894
|
+
width_context
|
|
3895
|
+
};
|
|
3896
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3897
|
+
headers: {
|
|
3898
|
+
"Content-Type": "application/json"
|
|
3899
|
+
}
|
|
3900
|
+
});
|
|
3906
3901
|
});
|
|
3907
3902
|
}
|
|
3908
3903
|
};
|
|
@@ -3911,259 +3906,285 @@ var kanban_service_default = KanbanServices;
|
|
|
3911
3906
|
// src/services/model-service/index.ts
|
|
3912
3907
|
var OBJECT_POSITION = 2;
|
|
3913
3908
|
var ModelService = {
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3909
|
+
getListMyBankAccount(_0) {
|
|
3910
|
+
return __async(this, arguments, function* ({
|
|
3911
|
+
domain,
|
|
3912
|
+
spectification,
|
|
3913
|
+
model
|
|
3914
|
+
}) {
|
|
3915
|
+
const env2 = getEnv();
|
|
3916
|
+
const jsonData = {
|
|
3917
|
+
model,
|
|
3918
|
+
method: "web_search_read",
|
|
3919
|
+
kwargs: {
|
|
3920
|
+
specification: spectification,
|
|
3921
|
+
domain,
|
|
3922
|
+
limit: 100,
|
|
3923
|
+
offset: 0
|
|
3924
|
+
}
|
|
3925
|
+
};
|
|
3926
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3927
|
+
headers: {
|
|
3928
|
+
"Content-Type": "application/json"
|
|
3929
|
+
}
|
|
3930
|
+
});
|
|
3934
3931
|
});
|
|
3935
3932
|
},
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3933
|
+
getCurrency() {
|
|
3934
|
+
return __async(this, null, function* () {
|
|
3935
|
+
const env2 = getEnv();
|
|
3936
|
+
const jsonData = {
|
|
3937
|
+
model: "res.currency",
|
|
3938
|
+
method: "web_search_read",
|
|
3939
|
+
kwargs: {
|
|
3940
|
+
specification: {
|
|
3941
|
+
icon_url: {},
|
|
3942
|
+
name: {}
|
|
3943
|
+
},
|
|
3944
|
+
domain: [["active", "=", true]],
|
|
3945
|
+
limit: 100,
|
|
3946
|
+
offset: 0
|
|
3947
|
+
}
|
|
3948
|
+
};
|
|
3949
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3950
|
+
headers: {
|
|
3951
|
+
"Content-Type": "application/json"
|
|
3952
|
+
}
|
|
3953
|
+
});
|
|
3955
3954
|
});
|
|
3956
3955
|
},
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3956
|
+
getConversionRate() {
|
|
3957
|
+
return __async(this, null, function* () {
|
|
3958
|
+
const env2 = getEnv();
|
|
3959
|
+
const jsonData = {
|
|
3960
|
+
model: "res.currency",
|
|
3961
|
+
method: "web_search_read",
|
|
3962
|
+
kwargs: {
|
|
3963
|
+
specification: {
|
|
3964
|
+
name: {},
|
|
3965
|
+
icon_url: {},
|
|
3966
|
+
rate_ids: {
|
|
3967
|
+
fields: {
|
|
3968
|
+
company_rate: {},
|
|
3969
|
+
sell: {}
|
|
3970
|
+
}
|
|
3970
3971
|
}
|
|
3971
|
-
}
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
}
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
}
|
|
3982
|
-
});
|
|
3983
|
-
},
|
|
3984
|
-
async getAll({ data }) {
|
|
3985
|
-
const env2 = getEnv();
|
|
3986
|
-
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3987
|
-
fields: data.fields,
|
|
3988
|
-
groupby: data.groupby
|
|
3989
|
-
} : {
|
|
3990
|
-
count_limit: 10001,
|
|
3991
|
-
order: data.sort,
|
|
3992
|
-
specification: data.specification
|
|
3993
|
-
};
|
|
3994
|
-
const jsonData = {
|
|
3995
|
-
model: String(data.model),
|
|
3996
|
-
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3997
|
-
ids: data.ids,
|
|
3998
|
-
with_context: data.context,
|
|
3999
|
-
kwargs: {
|
|
4000
|
-
domain: data.domain,
|
|
4001
|
-
limit: data.limit,
|
|
4002
|
-
offset: data.offset,
|
|
4003
|
-
...jsonReadGroup
|
|
4004
|
-
}
|
|
4005
|
-
};
|
|
4006
|
-
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4007
|
-
headers: {
|
|
4008
|
-
"Content-Type": "application/json"
|
|
4009
|
-
}
|
|
3972
|
+
},
|
|
3973
|
+
domain: [["active", "=", true]],
|
|
3974
|
+
limit: 100,
|
|
3975
|
+
offset: 0
|
|
3976
|
+
}
|
|
3977
|
+
};
|
|
3978
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3979
|
+
headers: {
|
|
3980
|
+
"Content-Type": "application/json"
|
|
3981
|
+
}
|
|
3982
|
+
});
|
|
4010
3983
|
});
|
|
4011
3984
|
},
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
fields: data.fields
|
|
4016
|
-
groupby: data.groupby
|
|
4017
|
-
} : {
|
|
4018
|
-
count_limit: 10001,
|
|
4019
|
-
order: data.sort,
|
|
4020
|
-
specification: data.specification
|
|
4021
|
-
};
|
|
4022
|
-
const jsonData = {
|
|
4023
|
-
model: String(data.model),
|
|
4024
|
-
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4025
|
-
ids: data.ids,
|
|
4026
|
-
with_context: data.context,
|
|
4027
|
-
kwargs: {
|
|
4028
|
-
domain: data.domain,
|
|
4029
|
-
limit: data.limit,
|
|
4030
|
-
offset: data.offset,
|
|
3985
|
+
getAll(_0) {
|
|
3986
|
+
return __async(this, arguments, function* ({ data }) {
|
|
3987
|
+
const env2 = getEnv();
|
|
3988
|
+
const jsonReadGroup = data.type == "calendar" ? { fields: data == null ? void 0 : data.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
4031
3989
|
fields: data.fields,
|
|
4032
|
-
|
|
4033
|
-
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
3990
|
+
groupby: data.groupby
|
|
3991
|
+
} : {
|
|
3992
|
+
count_limit: 10001,
|
|
3993
|
+
order: data.sort,
|
|
3994
|
+
specification: data.specification
|
|
3995
|
+
};
|
|
3996
|
+
const jsonData = {
|
|
3997
|
+
model: String(data.model),
|
|
3998
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3999
|
+
ids: data.ids,
|
|
4000
|
+
with_context: data.context,
|
|
4001
|
+
kwargs: __spreadValues({
|
|
4002
|
+
domain: data.domain,
|
|
4003
|
+
limit: data.limit,
|
|
4004
|
+
offset: data.offset
|
|
4005
|
+
}, jsonReadGroup)
|
|
4006
|
+
};
|
|
4007
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4008
|
+
headers: {
|
|
4009
|
+
"Content-Type": "application/json"
|
|
4010
|
+
}
|
|
4011
|
+
});
|
|
4039
4012
|
});
|
|
4040
4013
|
},
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
}
|
|
4014
|
+
getListCalendar(_0) {
|
|
4015
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4016
|
+
const env2 = getEnv();
|
|
4017
|
+
const jsonReadGroup = data.type == "calendar" ? data == null ? void 0 : data.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
4018
|
+
fields: data.fields,
|
|
4019
|
+
groupby: data.groupby
|
|
4020
|
+
} : {
|
|
4021
|
+
count_limit: 10001,
|
|
4022
|
+
order: data.sort,
|
|
4023
|
+
specification: data.specification
|
|
4024
|
+
};
|
|
4025
|
+
const jsonData = {
|
|
4026
|
+
model: String(data.model),
|
|
4027
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4028
|
+
ids: data.ids,
|
|
4029
|
+
with_context: data.context,
|
|
4030
|
+
kwargs: __spreadValues({
|
|
4031
|
+
domain: data.domain,
|
|
4032
|
+
limit: data.limit,
|
|
4033
|
+
offset: data.offset,
|
|
4034
|
+
fields: data.fields
|
|
4035
|
+
}, jsonReadGroup)
|
|
4036
|
+
};
|
|
4037
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4038
|
+
headers: {
|
|
4039
|
+
"Content-Type": "application/json"
|
|
4040
|
+
}
|
|
4041
|
+
});
|
|
4069
4042
|
});
|
|
4070
4043
|
},
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
model,
|
|
4074
|
-
specification,
|
|
4075
|
-
context
|
|
4076
|
-
}) {
|
|
4077
|
-
const env2 = getEnv();
|
|
4078
|
-
const jsonData = {
|
|
4044
|
+
getList(_0) {
|
|
4045
|
+
return __async(this, arguments, function* ({
|
|
4079
4046
|
model,
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
}
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4047
|
+
ids = [],
|
|
4048
|
+
specification = {},
|
|
4049
|
+
domain = [],
|
|
4050
|
+
offset,
|
|
4051
|
+
order,
|
|
4052
|
+
context = {},
|
|
4053
|
+
limit = 10
|
|
4054
|
+
}) {
|
|
4055
|
+
var _a;
|
|
4056
|
+
const env2 = getEnv();
|
|
4057
|
+
const jsonData = {
|
|
4058
|
+
model,
|
|
4059
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4060
|
+
ids,
|
|
4061
|
+
with_context: context,
|
|
4062
|
+
kwargs: {
|
|
4063
|
+
specification,
|
|
4064
|
+
domain,
|
|
4065
|
+
limit,
|
|
4066
|
+
offset,
|
|
4067
|
+
order
|
|
4068
|
+
}
|
|
4069
|
+
};
|
|
4070
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4071
|
+
headers: {
|
|
4072
|
+
"Content-Type": "application/json"
|
|
4073
|
+
}
|
|
4074
|
+
});
|
|
4091
4075
|
});
|
|
4092
4076
|
},
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
data = {},
|
|
4097
|
-
specification = {},
|
|
4098
|
-
context = {},
|
|
4099
|
-
path
|
|
4100
|
-
}) {
|
|
4101
|
-
const env2 = getEnv();
|
|
4102
|
-
const jsonData = {
|
|
4077
|
+
getDetail(_0) {
|
|
4078
|
+
return __async(this, arguments, function* ({
|
|
4079
|
+
ids = [],
|
|
4103
4080
|
model,
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4081
|
+
specification,
|
|
4082
|
+
context
|
|
4083
|
+
}) {
|
|
4084
|
+
var _a;
|
|
4085
|
+
const env2 = getEnv();
|
|
4086
|
+
const jsonData = {
|
|
4087
|
+
model,
|
|
4088
|
+
method: "web_read" /* WEB_READ */,
|
|
4089
|
+
ids,
|
|
4090
|
+
with_context: context,
|
|
4091
|
+
kwargs: {
|
|
4092
|
+
specification
|
|
4093
|
+
}
|
|
4094
|
+
};
|
|
4095
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4096
|
+
headers: {
|
|
4097
|
+
"Content-Type": "application/json"
|
|
4098
|
+
}
|
|
4099
|
+
});
|
|
4116
4100
|
});
|
|
4117
4101
|
},
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
const jsonData = {
|
|
4102
|
+
save(_0) {
|
|
4103
|
+
return __async(this, arguments, function* ({
|
|
4121
4104
|
model,
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4105
|
+
ids = [],
|
|
4106
|
+
data = {},
|
|
4107
|
+
specification = {},
|
|
4108
|
+
context = {},
|
|
4109
|
+
path
|
|
4110
|
+
}) {
|
|
4111
|
+
var _a;
|
|
4112
|
+
const env2 = getEnv();
|
|
4113
|
+
const jsonData = {
|
|
4114
|
+
model,
|
|
4115
|
+
method: "web_save" /* WEB_SAVE */,
|
|
4116
|
+
with_context: context,
|
|
4117
|
+
ids,
|
|
4118
|
+
kwargs: {
|
|
4119
|
+
vals: data,
|
|
4120
|
+
specification
|
|
4121
|
+
}
|
|
4122
|
+
};
|
|
4123
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(path != null ? path : "/call" /* CALL_PATH */, jsonData, {
|
|
4124
|
+
headers: {
|
|
4125
|
+
"Content-Type": "application/json"
|
|
4126
|
+
}
|
|
4127
|
+
});
|
|
4129
4128
|
});
|
|
4130
4129
|
},
|
|
4131
|
-
|
|
4132
|
-
ids = [],
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
args: [
|
|
4146
|
-
object ? object : {},
|
|
4147
|
-
fieldChange ? fieldChange : [],
|
|
4148
|
-
specification
|
|
4149
|
-
]
|
|
4150
|
-
};
|
|
4151
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4152
|
-
headers: {
|
|
4153
|
-
"Content-Type": "application/json"
|
|
4154
|
-
}
|
|
4130
|
+
delete(_0) {
|
|
4131
|
+
return __async(this, arguments, function* ({ ids = [], model }) {
|
|
4132
|
+
var _a;
|
|
4133
|
+
const env2 = getEnv();
|
|
4134
|
+
const jsonData = {
|
|
4135
|
+
model,
|
|
4136
|
+
method: "unlink" /* UNLINK */,
|
|
4137
|
+
ids
|
|
4138
|
+
};
|
|
4139
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4140
|
+
headers: {
|
|
4141
|
+
"Content-Type": "application/json"
|
|
4142
|
+
}
|
|
4143
|
+
});
|
|
4155
4144
|
});
|
|
4156
4145
|
},
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4146
|
+
onChange(_0) {
|
|
4147
|
+
return __async(this, arguments, function* ({
|
|
4148
|
+
ids = [],
|
|
4160
4149
|
model,
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4150
|
+
object,
|
|
4151
|
+
specification,
|
|
4152
|
+
context,
|
|
4153
|
+
fieldChange
|
|
4154
|
+
}) {
|
|
4155
|
+
var _a;
|
|
4156
|
+
const env2 = getEnv();
|
|
4157
|
+
const jsonData = {
|
|
4158
|
+
model,
|
|
4159
|
+
method: "onchange" /* ONCHANGE */,
|
|
4160
|
+
ids,
|
|
4161
|
+
with_context: context,
|
|
4162
|
+
args: [
|
|
4163
|
+
object ? object : {},
|
|
4164
|
+
fieldChange ? fieldChange : [],
|
|
4165
|
+
specification
|
|
4166
|
+
]
|
|
4167
|
+
};
|
|
4168
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4169
|
+
headers: {
|
|
4170
|
+
"Content-Type": "application/json"
|
|
4171
|
+
}
|
|
4172
|
+
});
|
|
4173
|
+
});
|
|
4174
|
+
},
|
|
4175
|
+
getListFieldsOnchange(_0) {
|
|
4176
|
+
return __async(this, arguments, function* ({ model }) {
|
|
4177
|
+
var _a;
|
|
4178
|
+
const env2 = getEnv();
|
|
4179
|
+
const jsonData = {
|
|
4180
|
+
model,
|
|
4181
|
+
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4182
|
+
};
|
|
4183
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4184
|
+
headers: {
|
|
4185
|
+
"Content-Type": "application/json"
|
|
4186
|
+
}
|
|
4187
|
+
});
|
|
4167
4188
|
});
|
|
4168
4189
|
},
|
|
4169
4190
|
parseORMOdoo(data) {
|
|
@@ -4177,13 +4198,14 @@ var ModelService = {
|
|
|
4177
4198
|
data[key] = "/";
|
|
4178
4199
|
}
|
|
4179
4200
|
}
|
|
4180
|
-
return {
|
|
4201
|
+
return __spreadValues({}, data);
|
|
4181
4202
|
},
|
|
4182
4203
|
toDataJS(data, viewData, model) {
|
|
4204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
4183
4205
|
for (const key in data) {
|
|
4184
4206
|
if (data[key] === false) {
|
|
4185
4207
|
if (viewData && model) {
|
|
4186
|
-
if (viewData
|
|
4208
|
+
if (((_c = (_b = (_a = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a[model]) == null ? void 0 : _b[key]) == null ? void 0 : _c.type) !== "boolean" /* BOOLEAN */) {
|
|
4187
4209
|
data[key] = null;
|
|
4188
4210
|
}
|
|
4189
4211
|
} else {
|
|
@@ -4193,12 +4215,13 @@ var ModelService = {
|
|
|
4193
4215
|
data[key] = "Draft";
|
|
4194
4216
|
} else if (data[key] !== false) {
|
|
4195
4217
|
if (model !== void 0) {
|
|
4196
|
-
if (viewData
|
|
4197
|
-
data[key] = (data[key]
|
|
4198
|
-
|
|
4218
|
+
if (((_f = (_e = (_d = viewData == null ? void 0 : viewData.models) == null ? void 0 : _d[model]) == null ? void 0 : _e[key]) == null ? void 0 : _f.type) === "one2many" /* ONE2MANY */ || ((_i = (_h = (_g = viewData == null ? void 0 : viewData.models) == null ? void 0 : _g[model]) == null ? void 0 : _h[key]) == null ? void 0 : _i.type) === "many2many" /* MANY2MANY */) {
|
|
4219
|
+
data[key] = (_k = (_j = data[key]) != null ? _j : data[key] = []) == null ? void 0 : _k.map((item) => {
|
|
4220
|
+
var _a2, _b2, _c2, _d2;
|
|
4221
|
+
const relation = (_c2 = (_b2 = (_a2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a2[model]) == null ? void 0 : _b2[key]) == null ? void 0 : _c2.relation;
|
|
4199
4222
|
if (relation !== void 0) {
|
|
4200
|
-
if (viewData
|
|
4201
|
-
if (item
|
|
4223
|
+
if ((_d2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _d2[relation]) {
|
|
4224
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4202
4225
|
return ModelService.toDataJS(
|
|
4203
4226
|
item[OBJECT_POSITION],
|
|
4204
4227
|
viewData,
|
|
@@ -4208,7 +4231,7 @@ var ModelService = {
|
|
|
4208
4231
|
return ModelService.toDataJS(item, viewData, relation);
|
|
4209
4232
|
}
|
|
4210
4233
|
} else {
|
|
4211
|
-
if (item
|
|
4234
|
+
if ((item == null ? void 0 : item.length) >= 3) {
|
|
4212
4235
|
return item[OBJECT_POSITION];
|
|
4213
4236
|
} else {
|
|
4214
4237
|
return item;
|
|
@@ -4220,514 +4243,556 @@ var ModelService = {
|
|
|
4220
4243
|
}
|
|
4221
4244
|
}
|
|
4222
4245
|
}
|
|
4223
|
-
return {
|
|
4246
|
+
return __spreadValues({}, data);
|
|
4224
4247
|
}
|
|
4225
4248
|
};
|
|
4226
4249
|
var model_service_default = ModelService;
|
|
4227
4250
|
|
|
4228
4251
|
// src/services/user-service/index.ts
|
|
4229
4252
|
var UserService = {
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4253
|
+
getProfile(path) {
|
|
4254
|
+
return __async(this, null, function* () {
|
|
4255
|
+
const env2 = getEnv();
|
|
4256
|
+
return env2.requests.get(path != null ? path : "/userinfo" /* PROFILE_PATH */, {
|
|
4257
|
+
headers: {
|
|
4258
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4259
|
+
}
|
|
4260
|
+
});
|
|
4236
4261
|
});
|
|
4237
4262
|
},
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
+
getUser(_0) {
|
|
4264
|
+
return __async(this, arguments, function* ({ context, id }) {
|
|
4265
|
+
const env2 = getEnv();
|
|
4266
|
+
const jsonData = {
|
|
4267
|
+
model: "res.users",
|
|
4268
|
+
method: "web_read",
|
|
4269
|
+
ids: [id],
|
|
4270
|
+
with_context: context,
|
|
4271
|
+
kwargs: {
|
|
4272
|
+
specification: {
|
|
4273
|
+
display_name: {},
|
|
4274
|
+
image_1920: {},
|
|
4275
|
+
name: {},
|
|
4276
|
+
login: {},
|
|
4277
|
+
email: {},
|
|
4278
|
+
password: {},
|
|
4279
|
+
visible_group_id: {
|
|
4280
|
+
fields: {
|
|
4281
|
+
id: {},
|
|
4282
|
+
display_name: {}
|
|
4283
|
+
}
|
|
4284
|
+
},
|
|
4285
|
+
company_id: {
|
|
4286
|
+
fields: {
|
|
4287
|
+
id: {},
|
|
4288
|
+
display_name: {}
|
|
4289
|
+
}
|
|
4263
4290
|
}
|
|
4264
4291
|
}
|
|
4265
4292
|
}
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
}
|
|
4293
|
+
};
|
|
4294
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4295
|
+
headers: {
|
|
4296
|
+
"Content-Type": "application/json"
|
|
4297
|
+
}
|
|
4298
|
+
});
|
|
4272
4299
|
});
|
|
4273
4300
|
},
|
|
4274
|
-
switchUserLocale:
|
|
4301
|
+
switchUserLocale: (_0) => __async(null, [_0], function* ({ id, values }) {
|
|
4302
|
+
var _a;
|
|
4275
4303
|
const env2 = getEnv();
|
|
4276
4304
|
const jsonData = {
|
|
4277
4305
|
model: "res.users",
|
|
4278
4306
|
domain: [["id", "=", id]],
|
|
4279
4307
|
values
|
|
4280
4308
|
};
|
|
4281
|
-
return env2
|
|
4309
|
+
return env2 == null ? void 0 : env2.requests.post((_a = UriConstants) == null ? void 0 : _a.CREATE_UPDATE_PATH, jsonData, {
|
|
4282
4310
|
headers: {
|
|
4283
4311
|
"Content-Type": "application/json"
|
|
4284
4312
|
}
|
|
4285
4313
|
});
|
|
4286
|
-
}
|
|
4314
|
+
})
|
|
4287
4315
|
};
|
|
4288
4316
|
var user_service_default = UserService;
|
|
4289
4317
|
|
|
4290
4318
|
// src/services/view-service/index.ts
|
|
4291
4319
|
var ViewService = {
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
views,
|
|
4295
|
-
context = {},
|
|
4296
|
-
options = {},
|
|
4297
|
-
aid
|
|
4298
|
-
}) {
|
|
4299
|
-
const env2 = getEnv();
|
|
4300
|
-
const defaultOptions = {
|
|
4301
|
-
load_filters: true,
|
|
4302
|
-
toolbar: true,
|
|
4303
|
-
action_id: aid
|
|
4304
|
-
};
|
|
4305
|
-
const jsonDataView = {
|
|
4320
|
+
getView(_0) {
|
|
4321
|
+
return __async(this, arguments, function* ({
|
|
4306
4322
|
model,
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4323
|
+
views,
|
|
4324
|
+
context = {},
|
|
4325
|
+
options = {},
|
|
4326
|
+
aid
|
|
4327
|
+
}) {
|
|
4328
|
+
var _a;
|
|
4329
|
+
const env2 = getEnv();
|
|
4330
|
+
const defaultOptions = {
|
|
4331
|
+
load_filters: true,
|
|
4332
|
+
toolbar: true,
|
|
4333
|
+
action_id: aid
|
|
4334
|
+
};
|
|
4335
|
+
const jsonDataView = {
|
|
4336
|
+
model,
|
|
4337
|
+
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
4338
|
+
kwargs: {
|
|
4339
|
+
views,
|
|
4340
|
+
options: __spreadValues(__spreadValues({}, options), defaultOptions)
|
|
4341
|
+
},
|
|
4342
|
+
with_context: context
|
|
4343
|
+
};
|
|
4344
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4345
|
+
headers: {
|
|
4346
|
+
"Content-Type": "application/json"
|
|
4347
|
+
}
|
|
4348
|
+
});
|
|
4318
4349
|
});
|
|
4319
4350
|
},
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
web_icon: {},
|
|
4344
|
-
web_icon_data: {},
|
|
4345
|
-
groups_id: {
|
|
4346
|
-
fields: {
|
|
4347
|
-
full_name: {}
|
|
4351
|
+
getMenu(context) {
|
|
4352
|
+
return __async(this, null, function* () {
|
|
4353
|
+
var _a;
|
|
4354
|
+
const env2 = getEnv();
|
|
4355
|
+
const jsonData = {
|
|
4356
|
+
model: "ir.ui.menu" /* MENU */,
|
|
4357
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4358
|
+
ids: [],
|
|
4359
|
+
with_context: context,
|
|
4360
|
+
kwargs: {
|
|
4361
|
+
specification: {
|
|
4362
|
+
active: {},
|
|
4363
|
+
name: {},
|
|
4364
|
+
is_display: {},
|
|
4365
|
+
sequence: {},
|
|
4366
|
+
complete_name: {},
|
|
4367
|
+
action: {
|
|
4368
|
+
fields: {
|
|
4369
|
+
display_name: {},
|
|
4370
|
+
type: {},
|
|
4371
|
+
binding_view_types: {}
|
|
4372
|
+
// res_model: {},
|
|
4373
|
+
}
|
|
4348
4374
|
},
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
active: {},
|
|
4356
|
-
name: {},
|
|
4357
|
-
is_display: {},
|
|
4358
|
-
sequence: {},
|
|
4359
|
-
complete_name: {},
|
|
4360
|
-
action: {
|
|
4361
|
-
fields: {
|
|
4362
|
-
display_name: {},
|
|
4363
|
-
type: {},
|
|
4364
|
-
binding_view_types: {}
|
|
4365
|
-
// res_model: {},
|
|
4366
|
-
}
|
|
4375
|
+
url_icon: {},
|
|
4376
|
+
web_icon: {},
|
|
4377
|
+
web_icon_data: {},
|
|
4378
|
+
groups_id: {
|
|
4379
|
+
fields: {
|
|
4380
|
+
full_name: {}
|
|
4367
4381
|
},
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4382
|
+
limit: 40,
|
|
4383
|
+
order: ""
|
|
4384
|
+
},
|
|
4385
|
+
display_name: {},
|
|
4386
|
+
child_id: {
|
|
4387
|
+
fields: {
|
|
4388
|
+
active: {},
|
|
4389
|
+
name: {},
|
|
4390
|
+
is_display: {},
|
|
4391
|
+
sequence: {},
|
|
4392
|
+
complete_name: {},
|
|
4393
|
+
action: {
|
|
4394
|
+
fields: {
|
|
4395
|
+
display_name: {},
|
|
4396
|
+
type: {},
|
|
4397
|
+
binding_view_types: {}
|
|
4398
|
+
// res_model: {},
|
|
4399
|
+
}
|
|
4374
4400
|
},
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
active: {},
|
|
4382
|
-
name: {},
|
|
4383
|
-
is_display: {},
|
|
4384
|
-
sequence: {},
|
|
4385
|
-
complete_name: {},
|
|
4386
|
-
action: {
|
|
4387
|
-
fields: {
|
|
4388
|
-
display_name: {},
|
|
4389
|
-
type: {},
|
|
4390
|
-
binding_view_types: {}
|
|
4391
|
-
// res_model: {},
|
|
4392
|
-
}
|
|
4401
|
+
url_icon: {},
|
|
4402
|
+
web_icon: {},
|
|
4403
|
+
web_icon_data: {},
|
|
4404
|
+
groups_id: {
|
|
4405
|
+
fields: {
|
|
4406
|
+
full_name: {}
|
|
4393
4407
|
},
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4408
|
+
limit: 40,
|
|
4409
|
+
order: ""
|
|
4410
|
+
},
|
|
4411
|
+
display_name: {},
|
|
4412
|
+
child_id: {
|
|
4413
|
+
fields: {
|
|
4414
|
+
active: {},
|
|
4415
|
+
name: {},
|
|
4416
|
+
is_display: {},
|
|
4417
|
+
sequence: {},
|
|
4418
|
+
complete_name: {},
|
|
4419
|
+
action: {
|
|
4420
|
+
fields: {
|
|
4421
|
+
display_name: {},
|
|
4422
|
+
type: {},
|
|
4423
|
+
binding_view_types: {}
|
|
4424
|
+
// res_model: {},
|
|
4425
|
+
}
|
|
4400
4426
|
},
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
active: {},
|
|
4408
|
-
name: {},
|
|
4409
|
-
is_display: {},
|
|
4410
|
-
sequence: {},
|
|
4411
|
-
complete_name: {},
|
|
4412
|
-
action: {
|
|
4413
|
-
fields: {
|
|
4414
|
-
display_name: {},
|
|
4415
|
-
type: {},
|
|
4416
|
-
binding_view_types: {}
|
|
4417
|
-
// res_model: {},
|
|
4418
|
-
}
|
|
4427
|
+
url_icon: {},
|
|
4428
|
+
web_icon: {},
|
|
4429
|
+
web_icon_data: {},
|
|
4430
|
+
groups_id: {
|
|
4431
|
+
fields: {
|
|
4432
|
+
full_name: {}
|
|
4419
4433
|
},
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4434
|
+
limit: 40,
|
|
4435
|
+
order: ""
|
|
4436
|
+
},
|
|
4437
|
+
display_name: {},
|
|
4438
|
+
child_id: {
|
|
4439
|
+
fields: {
|
|
4440
|
+
active: {},
|
|
4441
|
+
name: {},
|
|
4442
|
+
is_display: {},
|
|
4443
|
+
sequence: {},
|
|
4444
|
+
complete_name: {},
|
|
4445
|
+
action: {
|
|
4446
|
+
fields: {
|
|
4447
|
+
display_name: {},
|
|
4448
|
+
type: {},
|
|
4449
|
+
binding_view_types: {}
|
|
4450
|
+
// res_model: {},
|
|
4451
|
+
}
|
|
4426
4452
|
},
|
|
4427
|
-
|
|
4428
|
-
|
|
4453
|
+
url_icon: {},
|
|
4454
|
+
web_icon: {},
|
|
4455
|
+
web_icon_data: {},
|
|
4456
|
+
groups_id: {
|
|
4457
|
+
fields: {
|
|
4458
|
+
full_name: {}
|
|
4459
|
+
},
|
|
4460
|
+
limit: 40,
|
|
4461
|
+
order: ""
|
|
4462
|
+
},
|
|
4463
|
+
display_name: {},
|
|
4464
|
+
child_id: {
|
|
4465
|
+
fields: {},
|
|
4466
|
+
limit: 40,
|
|
4467
|
+
order: ""
|
|
4468
|
+
}
|
|
4429
4469
|
},
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
}
|
|
4457
|
-
};
|
|
4458
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4459
|
-
headers: {
|
|
4460
|
-
"Content-Type": "application/json"
|
|
4461
|
-
}
|
|
4470
|
+
limit: 40,
|
|
4471
|
+
order: ""
|
|
4472
|
+
}
|
|
4473
|
+
},
|
|
4474
|
+
limit: 40,
|
|
4475
|
+
order: ""
|
|
4476
|
+
}
|
|
4477
|
+
},
|
|
4478
|
+
limit: 40,
|
|
4479
|
+
order: ""
|
|
4480
|
+
}
|
|
4481
|
+
},
|
|
4482
|
+
domain: [
|
|
4483
|
+
"&",
|
|
4484
|
+
["is_display", "=", true],
|
|
4485
|
+
"&",
|
|
4486
|
+
["active", "=", true],
|
|
4487
|
+
["parent_id", "=", false]
|
|
4488
|
+
]
|
|
4489
|
+
}
|
|
4490
|
+
};
|
|
4491
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4492
|
+
headers: {
|
|
4493
|
+
"Content-Type": "application/json"
|
|
4494
|
+
}
|
|
4495
|
+
});
|
|
4462
4496
|
});
|
|
4463
4497
|
},
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4498
|
+
getActionDetail(aid, context) {
|
|
4499
|
+
return __async(this, null, function* () {
|
|
4500
|
+
var _a;
|
|
4501
|
+
const env2 = getEnv();
|
|
4502
|
+
const jsonData = {
|
|
4503
|
+
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
4504
|
+
method: "web_read" /* WEB_READ */,
|
|
4505
|
+
ids: [aid],
|
|
4506
|
+
with_context: context,
|
|
4507
|
+
kwargs: {
|
|
4508
|
+
specification: {
|
|
4509
|
+
id: {},
|
|
4510
|
+
name: {},
|
|
4511
|
+
res_model: {},
|
|
4512
|
+
views: {},
|
|
4513
|
+
view_mode: {},
|
|
4514
|
+
mobile_view_mode: {},
|
|
4515
|
+
domain: {},
|
|
4516
|
+
context: {},
|
|
4517
|
+
groups_id: {},
|
|
4518
|
+
search_view_id: {}
|
|
4519
|
+
}
|
|
4483
4520
|
}
|
|
4484
|
-
}
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
}
|
|
4521
|
+
};
|
|
4522
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4523
|
+
headers: {
|
|
4524
|
+
"Content-Type": "application/json"
|
|
4525
|
+
}
|
|
4526
|
+
});
|
|
4490
4527
|
});
|
|
4491
4528
|
},
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
ids,
|
|
4495
|
-
context,
|
|
4496
|
-
offset
|
|
4497
|
-
}) {
|
|
4498
|
-
const env2 = getEnv();
|
|
4499
|
-
const jsonData = {
|
|
4529
|
+
getResequence(_0) {
|
|
4530
|
+
return __async(this, arguments, function* ({
|
|
4500
4531
|
model,
|
|
4501
|
-
with_context: context,
|
|
4502
4532
|
ids,
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4533
|
+
context,
|
|
4534
|
+
offset
|
|
4535
|
+
}) {
|
|
4536
|
+
const env2 = getEnv();
|
|
4537
|
+
const jsonData = __spreadValues({
|
|
4538
|
+
model,
|
|
4539
|
+
with_context: context,
|
|
4540
|
+
ids,
|
|
4541
|
+
field: "sequence"
|
|
4542
|
+
}, offset > 0 ? { offset } : {});
|
|
4543
|
+
return env2 == null ? void 0 : env2.requests.post("/web/dataset/resequence", jsonData, {
|
|
4544
|
+
headers: {
|
|
4545
|
+
"Content-Type": "application/json"
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4510
4548
|
});
|
|
4511
4549
|
},
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4550
|
+
getSelectionItem(_0) {
|
|
4551
|
+
return __async(this, arguments, function* ({ data }) {
|
|
4552
|
+
var _a;
|
|
4553
|
+
const env2 = getEnv();
|
|
4554
|
+
const jsonData = {
|
|
4555
|
+
model: data.model,
|
|
4556
|
+
ids: [],
|
|
4557
|
+
method: "get_data_select",
|
|
4558
|
+
with_context: data.context,
|
|
4559
|
+
kwargs: {
|
|
4560
|
+
count_limit: 10001,
|
|
4561
|
+
domain: data.domain ? data.domain : [],
|
|
4562
|
+
offset: 0,
|
|
4563
|
+
order: "",
|
|
4564
|
+
specification: (_a = data == null ? void 0 : data.specification) != null ? _a : {
|
|
4565
|
+
id: {},
|
|
4566
|
+
name: {},
|
|
4567
|
+
display_name: {}
|
|
4568
|
+
}
|
|
4528
4569
|
}
|
|
4529
|
-
}
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
}
|
|
4570
|
+
};
|
|
4571
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4572
|
+
headers: {
|
|
4573
|
+
"Content-Type": "application/json"
|
|
4574
|
+
}
|
|
4575
|
+
});
|
|
4535
4576
|
});
|
|
4536
4577
|
},
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4578
|
+
loadMessages() {
|
|
4579
|
+
return __async(this, null, function* () {
|
|
4580
|
+
const env2 = getEnv();
|
|
4581
|
+
return env2.requests.post(
|
|
4582
|
+
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
4583
|
+
{},
|
|
4584
|
+
{
|
|
4585
|
+
headers: {
|
|
4586
|
+
"Content-Type": "application/json"
|
|
4587
|
+
}
|
|
4588
|
+
}
|
|
4589
|
+
);
|
|
4590
|
+
});
|
|
4591
|
+
},
|
|
4592
|
+
getVersion() {
|
|
4593
|
+
return __async(this, null, function* () {
|
|
4594
|
+
var _a;
|
|
4595
|
+
const env2 = getEnv();
|
|
4596
|
+
console.log("env?.requests", env2, env2 == null ? void 0 : env2.requests);
|
|
4597
|
+
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.get("", {
|
|
4543
4598
|
headers: {
|
|
4544
4599
|
"Content-Type": "application/json"
|
|
4545
4600
|
}
|
|
4546
|
-
}
|
|
4547
|
-
);
|
|
4548
|
-
},
|
|
4549
|
-
async getVersion() {
|
|
4550
|
-
const env2 = getEnv();
|
|
4551
|
-
return env2?.requests.get("", {
|
|
4552
|
-
headers: {
|
|
4553
|
-
"Content-Type": "application/json"
|
|
4554
|
-
}
|
|
4601
|
+
});
|
|
4555
4602
|
});
|
|
4556
4603
|
},
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
with_context
|
|
4560
|
-
}) {
|
|
4561
|
-
const env2 = getEnv();
|
|
4562
|
-
const jsonData = {
|
|
4604
|
+
get2FAMethods(_0) {
|
|
4605
|
+
return __async(this, arguments, function* ({
|
|
4563
4606
|
method,
|
|
4564
4607
|
with_context
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4608
|
+
}) {
|
|
4609
|
+
const env2 = getEnv();
|
|
4610
|
+
const jsonData = {
|
|
4611
|
+
method,
|
|
4612
|
+
with_context
|
|
4613
|
+
};
|
|
4614
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4615
|
+
headers: {
|
|
4616
|
+
"Content-Type": "application/json"
|
|
4617
|
+
}
|
|
4618
|
+
});
|
|
4570
4619
|
});
|
|
4571
4620
|
},
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
with_context,
|
|
4575
|
-
code,
|
|
4576
|
-
device,
|
|
4577
|
-
location
|
|
4578
|
-
}) {
|
|
4579
|
-
const env2 = getEnv();
|
|
4580
|
-
const jsonData = {
|
|
4621
|
+
verify2FA(_0) {
|
|
4622
|
+
return __async(this, arguments, function* ({
|
|
4581
4623
|
method,
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4624
|
+
with_context,
|
|
4625
|
+
code,
|
|
4626
|
+
device,
|
|
4627
|
+
location
|
|
4628
|
+
}) {
|
|
4629
|
+
const env2 = getEnv();
|
|
4630
|
+
const jsonData = {
|
|
4631
|
+
method,
|
|
4632
|
+
kwargs: {
|
|
4633
|
+
vals: {
|
|
4634
|
+
code,
|
|
4635
|
+
device,
|
|
4636
|
+
location
|
|
4637
|
+
}
|
|
4638
|
+
},
|
|
4639
|
+
with_context
|
|
4640
|
+
};
|
|
4641
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4642
|
+
headers: {
|
|
4643
|
+
"Content-Type": "application/json"
|
|
4644
|
+
},
|
|
4645
|
+
withCredentials: true
|
|
4646
|
+
});
|
|
4596
4647
|
});
|
|
4597
4648
|
},
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
state,
|
|
4601
|
-
client_id,
|
|
4602
|
-
response_type,
|
|
4603
|
-
path
|
|
4604
|
-
}) {
|
|
4605
|
-
const env2 = getEnv();
|
|
4606
|
-
const params = new URLSearchParams({
|
|
4607
|
-
response_type,
|
|
4608
|
-
client_id,
|
|
4649
|
+
signInSSO(_0) {
|
|
4650
|
+
return __async(this, arguments, function* ({
|
|
4609
4651
|
redirect_uri,
|
|
4610
|
-
state
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4652
|
+
state,
|
|
4653
|
+
client_id,
|
|
4654
|
+
response_type,
|
|
4655
|
+
path
|
|
4656
|
+
}) {
|
|
4657
|
+
const env2 = getEnv();
|
|
4658
|
+
const params = new URLSearchParams({
|
|
4659
|
+
response_type,
|
|
4660
|
+
client_id,
|
|
4661
|
+
redirect_uri,
|
|
4662
|
+
state
|
|
4663
|
+
});
|
|
4664
|
+
const url = `${path}?${params.toString()}`;
|
|
4665
|
+
return env2 == null ? void 0 : env2.requests.get(url, {
|
|
4666
|
+
headers: {
|
|
4667
|
+
"Content-Type": "application/json"
|
|
4668
|
+
},
|
|
4669
|
+
withCredentials: true
|
|
4670
|
+
});
|
|
4618
4671
|
});
|
|
4619
4672
|
},
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
state,
|
|
4623
|
-
client_id,
|
|
4624
|
-
scopes
|
|
4625
|
-
}) {
|
|
4626
|
-
const env2 = getEnv();
|
|
4627
|
-
const jsonData = {
|
|
4673
|
+
grantAccess(_0) {
|
|
4674
|
+
return __async(this, arguments, function* ({
|
|
4628
4675
|
redirect_uri,
|
|
4629
4676
|
state,
|
|
4630
4677
|
client_id,
|
|
4631
4678
|
scopes
|
|
4632
|
-
}
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4679
|
+
}) {
|
|
4680
|
+
const env2 = getEnv();
|
|
4681
|
+
const jsonData = {
|
|
4682
|
+
redirect_uri,
|
|
4683
|
+
state,
|
|
4684
|
+
client_id,
|
|
4685
|
+
scopes
|
|
4686
|
+
};
|
|
4687
|
+
return env2 == null ? void 0 : env2.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
|
|
4688
|
+
headers: {
|
|
4689
|
+
"Content-Type": "application/json"
|
|
4690
|
+
},
|
|
4691
|
+
withCredentials: true
|
|
4692
|
+
});
|
|
4638
4693
|
});
|
|
4639
4694
|
},
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
token,
|
|
4643
|
-
views
|
|
4644
|
-
}) {
|
|
4645
|
-
const env2 = getEnv();
|
|
4646
|
-
const jsonData = {
|
|
4695
|
+
getFieldsViewSecurity(_0) {
|
|
4696
|
+
return __async(this, arguments, function* ({
|
|
4647
4697
|
method,
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4698
|
+
token,
|
|
4699
|
+
views
|
|
4700
|
+
}) {
|
|
4701
|
+
const env2 = getEnv();
|
|
4702
|
+
const jsonData = {
|
|
4703
|
+
method,
|
|
4704
|
+
kwargs: {
|
|
4705
|
+
views
|
|
4706
|
+
},
|
|
4707
|
+
with_context: {
|
|
4708
|
+
token
|
|
4709
|
+
}
|
|
4710
|
+
};
|
|
4711
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4712
|
+
headers: {
|
|
4713
|
+
"Content-Type": "application/json"
|
|
4714
|
+
}
|
|
4715
|
+
});
|
|
4659
4716
|
});
|
|
4660
4717
|
},
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
model,
|
|
4664
|
-
kwargs,
|
|
4665
|
-
token
|
|
4666
|
-
}) {
|
|
4667
|
-
const env2 = getEnv();
|
|
4668
|
-
const jsonData = {
|
|
4718
|
+
settingsWebRead2fa(_0) {
|
|
4719
|
+
return __async(this, arguments, function* ({
|
|
4669
4720
|
method,
|
|
4670
4721
|
model,
|
|
4671
4722
|
kwargs,
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4723
|
+
token
|
|
4724
|
+
}) {
|
|
4725
|
+
const env2 = getEnv();
|
|
4726
|
+
const jsonData = {
|
|
4727
|
+
method,
|
|
4728
|
+
model,
|
|
4729
|
+
kwargs,
|
|
4730
|
+
with_context: {
|
|
4731
|
+
token
|
|
4732
|
+
}
|
|
4733
|
+
};
|
|
4734
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4735
|
+
headers: {
|
|
4736
|
+
"Content-Type": "application/json"
|
|
4737
|
+
}
|
|
4738
|
+
});
|
|
4680
4739
|
});
|
|
4681
4740
|
},
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4741
|
+
requestSetupTotp(_0) {
|
|
4742
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4743
|
+
const env2 = getEnv();
|
|
4744
|
+
const jsonData = {
|
|
4745
|
+
method,
|
|
4746
|
+
with_context: {
|
|
4747
|
+
token
|
|
4748
|
+
}
|
|
4749
|
+
};
|
|
4750
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4751
|
+
headers: {
|
|
4752
|
+
"Content-Type": "application/json"
|
|
4753
|
+
}
|
|
4754
|
+
});
|
|
4694
4755
|
});
|
|
4695
4756
|
},
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
action_token,
|
|
4699
|
-
code
|
|
4700
|
-
}) {
|
|
4701
|
-
const env2 = getEnv();
|
|
4702
|
-
const jsonData = {
|
|
4757
|
+
verifyTotp(_0) {
|
|
4758
|
+
return __async(this, arguments, function* ({
|
|
4703
4759
|
method,
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4760
|
+
action_token,
|
|
4761
|
+
code
|
|
4762
|
+
}) {
|
|
4763
|
+
const env2 = getEnv();
|
|
4764
|
+
const jsonData = {
|
|
4765
|
+
method,
|
|
4766
|
+
kwargs: {
|
|
4767
|
+
vals: {
|
|
4768
|
+
code
|
|
4769
|
+
}
|
|
4770
|
+
},
|
|
4771
|
+
with_context: {
|
|
4772
|
+
action_token
|
|
4707
4773
|
}
|
|
4708
|
-
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
headers: {
|
|
4715
|
-
"Content-Type": "application/json"
|
|
4716
|
-
}
|
|
4774
|
+
};
|
|
4775
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4776
|
+
headers: {
|
|
4777
|
+
"Content-Type": "application/json"
|
|
4778
|
+
}
|
|
4779
|
+
});
|
|
4717
4780
|
});
|
|
4718
4781
|
},
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4782
|
+
removeTotpSetUp(_0) {
|
|
4783
|
+
return __async(this, arguments, function* ({ method, token }) {
|
|
4784
|
+
const env2 = getEnv();
|
|
4785
|
+
const jsonData = {
|
|
4786
|
+
method,
|
|
4787
|
+
with_context: {
|
|
4788
|
+
token
|
|
4789
|
+
}
|
|
4790
|
+
};
|
|
4791
|
+
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4792
|
+
headers: {
|
|
4793
|
+
"Content-Type": "application/json"
|
|
4794
|
+
}
|
|
4795
|
+
});
|
|
4731
4796
|
});
|
|
4732
4797
|
}
|
|
4733
4798
|
};
|
|
@@ -4735,7 +4800,7 @@ var view_service_default = ViewService;
|
|
|
4735
4800
|
|
|
4736
4801
|
// src/hooks/auth/use-forgot-password.ts
|
|
4737
4802
|
var useForgotPassword = () => {
|
|
4738
|
-
return
|
|
4803
|
+
return useMutation({
|
|
4739
4804
|
mutationFn: (email) => {
|
|
4740
4805
|
return auth_service_default.forgotPassword(email);
|
|
4741
4806
|
}
|
|
@@ -4744,9 +4809,9 @@ var useForgotPassword = () => {
|
|
|
4744
4809
|
var use_forgot_password_default = useForgotPassword;
|
|
4745
4810
|
|
|
4746
4811
|
// src/hooks/auth/use-forgotpassword-sso.ts
|
|
4747
|
-
|
|
4812
|
+
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
|
4748
4813
|
var useForgotPasswordSSO = () => {
|
|
4749
|
-
return (
|
|
4814
|
+
return useMutation2({
|
|
4750
4815
|
mutationFn: ({
|
|
4751
4816
|
email,
|
|
4752
4817
|
with_context,
|
|
@@ -4759,20 +4824,20 @@ var useForgotPasswordSSO = () => {
|
|
|
4759
4824
|
var use_forgotpassword_sso_default = useForgotPasswordSSO;
|
|
4760
4825
|
|
|
4761
4826
|
// src/hooks/auth/use-get-provider.ts
|
|
4762
|
-
|
|
4827
|
+
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
|
4763
4828
|
var useGetProvider = () => {
|
|
4764
|
-
return (
|
|
4829
|
+
return useMutation3({
|
|
4765
4830
|
mutationFn: (data) => {
|
|
4766
|
-
return auth_service_default.getProviders(data
|
|
4831
|
+
return auth_service_default.getProviders(data == null ? void 0 : data.db);
|
|
4767
4832
|
}
|
|
4768
4833
|
});
|
|
4769
4834
|
};
|
|
4770
4835
|
var use_get_provider_default = useGetProvider;
|
|
4771
4836
|
|
|
4772
4837
|
// src/hooks/auth/use-isvalid-token.ts
|
|
4773
|
-
|
|
4838
|
+
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
|
4774
4839
|
var useIsValidToken = () => {
|
|
4775
|
-
return (
|
|
4840
|
+
return useMutation4({
|
|
4776
4841
|
mutationFn: (token) => {
|
|
4777
4842
|
return auth_service_default.isValidToken(token);
|
|
4778
4843
|
}
|
|
@@ -4781,9 +4846,9 @@ var useIsValidToken = () => {
|
|
|
4781
4846
|
var use_isvalid_token_default = useIsValidToken;
|
|
4782
4847
|
|
|
4783
4848
|
// src/hooks/auth/use-login-credential.ts
|
|
4784
|
-
|
|
4849
|
+
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
4785
4850
|
var useLoginCredential = () => {
|
|
4786
|
-
return (
|
|
4851
|
+
return useMutation5({
|
|
4787
4852
|
mutationFn: (data) => {
|
|
4788
4853
|
return auth_service_default.login(data);
|
|
4789
4854
|
}
|
|
@@ -4792,9 +4857,9 @@ var useLoginCredential = () => {
|
|
|
4792
4857
|
var use_login_credential_default = useLoginCredential;
|
|
4793
4858
|
|
|
4794
4859
|
// src/hooks/auth/use-login-socical.ts
|
|
4795
|
-
|
|
4860
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
4796
4861
|
var useLoginSocial = () => {
|
|
4797
|
-
return (
|
|
4862
|
+
return useMutation6({
|
|
4798
4863
|
mutationFn: (data) => {
|
|
4799
4864
|
return auth_service_default.loginSocial(data);
|
|
4800
4865
|
}
|
|
@@ -4803,9 +4868,9 @@ var useLoginSocial = () => {
|
|
|
4803
4868
|
var use_login_socical_default = useLoginSocial;
|
|
4804
4869
|
|
|
4805
4870
|
// src/hooks/auth/use-reset-password.ts
|
|
4806
|
-
|
|
4871
|
+
import { useMutation as useMutation7 } from "@tanstack/react-query";
|
|
4807
4872
|
var useResetPassword = () => {
|
|
4808
|
-
return (
|
|
4873
|
+
return useMutation7({
|
|
4809
4874
|
mutationFn: (request) => {
|
|
4810
4875
|
return auth_service_default.resetPassword(request.data, request.token);
|
|
4811
4876
|
}
|
|
@@ -4814,9 +4879,9 @@ var useResetPassword = () => {
|
|
|
4814
4879
|
var use_reset_password_default = useResetPassword;
|
|
4815
4880
|
|
|
4816
4881
|
// src/hooks/auth/use-reset-password-sso.ts
|
|
4817
|
-
|
|
4882
|
+
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
4818
4883
|
var useResetPasswordSSO = () => {
|
|
4819
|
-
return (
|
|
4884
|
+
return useMutation8({
|
|
4820
4885
|
mutationFn: ({
|
|
4821
4886
|
method,
|
|
4822
4887
|
password,
|
|
@@ -4833,9 +4898,9 @@ var useResetPasswordSSO = () => {
|
|
|
4833
4898
|
var use_reset_password_sso_default = useResetPasswordSSO;
|
|
4834
4899
|
|
|
4835
4900
|
// src/hooks/auth/use-update-password.ts
|
|
4836
|
-
|
|
4901
|
+
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
4837
4902
|
var useUpdatePassword = () => {
|
|
4838
|
-
return (
|
|
4903
|
+
return useMutation9({
|
|
4839
4904
|
mutationFn: (request) => {
|
|
4840
4905
|
return auth_service_default.updatePassword(request.data, request.token);
|
|
4841
4906
|
}
|
|
@@ -4844,9 +4909,9 @@ var useUpdatePassword = () => {
|
|
|
4844
4909
|
var use_update_password_default = useUpdatePassword;
|
|
4845
4910
|
|
|
4846
4911
|
// src/hooks/auth/use-logout.ts
|
|
4847
|
-
|
|
4912
|
+
import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
4848
4913
|
var useLogout = () => {
|
|
4849
|
-
return (
|
|
4914
|
+
return useMutation10({
|
|
4850
4915
|
mutationFn: (data) => {
|
|
4851
4916
|
return auth_service_default.logout(data);
|
|
4852
4917
|
}
|
|
@@ -4855,9 +4920,9 @@ var useLogout = () => {
|
|
|
4855
4920
|
var use_logout_default = useLogout;
|
|
4856
4921
|
|
|
4857
4922
|
// src/hooks/auth/use-get-access-by-code.ts
|
|
4858
|
-
|
|
4923
|
+
import { useMutation as useMutation11 } from "@tanstack/react-query";
|
|
4859
4924
|
var useGetAccessByCode = () => {
|
|
4860
|
-
return (
|
|
4925
|
+
return useMutation11({
|
|
4861
4926
|
mutationFn: ({ code }) => {
|
|
4862
4927
|
return auth_service_default.getAccessByCode(code);
|
|
4863
4928
|
}
|
|
@@ -4866,25 +4931,25 @@ var useGetAccessByCode = () => {
|
|
|
4866
4931
|
var use_get_access_by_code_default = useGetAccessByCode;
|
|
4867
4932
|
|
|
4868
4933
|
// src/hooks/company/use-get-company-info.ts
|
|
4869
|
-
|
|
4934
|
+
import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
4870
4935
|
var useGetCompanyInfo = () => {
|
|
4871
|
-
return (
|
|
4936
|
+
return useMutation12({
|
|
4872
4937
|
mutationFn: (id) => company_service_default.getInfoCompany(id)
|
|
4873
4938
|
});
|
|
4874
4939
|
};
|
|
4875
4940
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
4876
4941
|
|
|
4877
4942
|
// src/hooks/company/use-get-current-company.ts
|
|
4878
|
-
|
|
4943
|
+
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
4879
4944
|
var useGetCurrentCompany = () => {
|
|
4880
|
-
return (
|
|
4945
|
+
return useMutation13({
|
|
4881
4946
|
mutationFn: () => company_service_default.getCurrentCompany()
|
|
4882
4947
|
});
|
|
4883
4948
|
};
|
|
4884
4949
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
4885
4950
|
|
|
4886
4951
|
// src/hooks/company/use-get-list-company.ts
|
|
4887
|
-
|
|
4952
|
+
import { useQuery } from "@tanstack/react-query";
|
|
4888
4953
|
var useGetListCompany = (companyIDs = []) => {
|
|
4889
4954
|
const companySpec = {
|
|
4890
4955
|
id: {},
|
|
@@ -4895,7 +4960,7 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
4895
4960
|
ids: companyIDs,
|
|
4896
4961
|
specification: companySpec
|
|
4897
4962
|
};
|
|
4898
|
-
return
|
|
4963
|
+
return useQuery({
|
|
4899
4964
|
queryKey: ["list_company" /* LIST_COMPANY */, companyIDs],
|
|
4900
4965
|
queryFn: () => model_service_default.getList(getListParams),
|
|
4901
4966
|
refetchOnWindowFocus: false
|
|
@@ -4904,9 +4969,9 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
4904
4969
|
var use_get_list_company_default = useGetListCompany;
|
|
4905
4970
|
|
|
4906
4971
|
// src/hooks/excel/use-export-excel.ts
|
|
4907
|
-
|
|
4972
|
+
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
4908
4973
|
var useExportExcel = () => {
|
|
4909
|
-
return (
|
|
4974
|
+
return useMutation14({
|
|
4910
4975
|
mutationFn: ({
|
|
4911
4976
|
model,
|
|
4912
4977
|
domain,
|
|
@@ -4931,9 +4996,9 @@ var useExportExcel = () => {
|
|
|
4931
4996
|
var use_export_excel_default = useExportExcel;
|
|
4932
4997
|
|
|
4933
4998
|
// src/hooks/excel/use-get-field-export.ts
|
|
4934
|
-
|
|
4999
|
+
import { useMutation as useMutation15 } from "@tanstack/react-query";
|
|
4935
5000
|
var useGetFieldExport = () => {
|
|
4936
|
-
return (
|
|
5001
|
+
return useMutation15({
|
|
4937
5002
|
mutationFn: ({
|
|
4938
5003
|
ids,
|
|
4939
5004
|
model,
|
|
@@ -4962,9 +5027,9 @@ var useGetFieldExport = () => {
|
|
|
4962
5027
|
var use_get_field_export_default = useGetFieldExport;
|
|
4963
5028
|
|
|
4964
5029
|
// src/hooks/excel/use-get-file-excel.ts
|
|
4965
|
-
|
|
5030
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4966
5031
|
var useGetFileExcel = ({ model }) => {
|
|
4967
|
-
return (
|
|
5032
|
+
return useQuery2({
|
|
4968
5033
|
queryKey: [],
|
|
4969
5034
|
queryFn: () => excel_service_default.getFileExcel({
|
|
4970
5035
|
model
|
|
@@ -4980,9 +5045,9 @@ var useGetFileExcel = ({ model }) => {
|
|
|
4980
5045
|
var use_get_file_excel_default = useGetFileExcel;
|
|
4981
5046
|
|
|
4982
5047
|
// src/hooks/excel/use-parse-preview.ts
|
|
4983
|
-
|
|
5048
|
+
import { useMutation as useMutation16 } from "@tanstack/react-query";
|
|
4984
5049
|
var useParsePreview = () => {
|
|
4985
|
-
return (
|
|
5050
|
+
return useMutation16({
|
|
4986
5051
|
mutationFn: ({
|
|
4987
5052
|
id,
|
|
4988
5053
|
selectedSheet,
|
|
@@ -4999,9 +5064,9 @@ var useParsePreview = () => {
|
|
|
4999
5064
|
var use_parse_preview_default = useParsePreview;
|
|
5000
5065
|
|
|
5001
5066
|
// src/hooks/excel/use-upload-file.ts
|
|
5002
|
-
|
|
5067
|
+
import { useMutation as useMutation17 } from "@tanstack/react-query";
|
|
5003
5068
|
var useUploadFile = () => {
|
|
5004
|
-
return (
|
|
5069
|
+
return useMutation17({
|
|
5005
5070
|
mutationFn: ({ formData }) => excel_service_default.uploadFile({
|
|
5006
5071
|
formData
|
|
5007
5072
|
})
|
|
@@ -5010,9 +5075,9 @@ var useUploadFile = () => {
|
|
|
5010
5075
|
var use_upload_file_default = useUploadFile;
|
|
5011
5076
|
|
|
5012
5077
|
// src/hooks/excel/use-upload-id-file.ts
|
|
5013
|
-
|
|
5078
|
+
import { useMutation as useMutation18 } from "@tanstack/react-query";
|
|
5014
5079
|
var useUploadIdFile = () => {
|
|
5015
|
-
return (
|
|
5080
|
+
return useMutation18({
|
|
5016
5081
|
mutationFn: ({ formData }) => excel_service_default.uploadIdFile({
|
|
5017
5082
|
formData
|
|
5018
5083
|
})
|
|
@@ -5021,9 +5086,9 @@ var useUploadIdFile = () => {
|
|
|
5021
5086
|
var use_upload_id_file_default = useUploadIdFile;
|
|
5022
5087
|
|
|
5023
5088
|
// src/hooks/excel/uss-execute-import.ts
|
|
5024
|
-
|
|
5089
|
+
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
5025
5090
|
var useExecuteImport = () => {
|
|
5026
|
-
return (
|
|
5091
|
+
return useMutation19({
|
|
5027
5092
|
mutationFn: ({
|
|
5028
5093
|
fields,
|
|
5029
5094
|
columns,
|
|
@@ -5044,9 +5109,9 @@ var useExecuteImport = () => {
|
|
|
5044
5109
|
var uss_execute_import_default = useExecuteImport;
|
|
5045
5110
|
|
|
5046
5111
|
// src/hooks/form/use-change-status.ts
|
|
5047
|
-
|
|
5112
|
+
import { useMutation as useMutation20 } from "@tanstack/react-query";
|
|
5048
5113
|
var useChangeStatus = () => {
|
|
5049
|
-
return (
|
|
5114
|
+
return useMutation20({
|
|
5050
5115
|
mutationFn: ({ data }) => {
|
|
5051
5116
|
return form_service_default.changeStatus({
|
|
5052
5117
|
data
|
|
@@ -5057,9 +5122,9 @@ var useChangeStatus = () => {
|
|
|
5057
5122
|
var use_change_status_default = useChangeStatus;
|
|
5058
5123
|
|
|
5059
5124
|
// src/hooks/form/use-delete-comment.ts
|
|
5060
|
-
|
|
5125
|
+
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
5061
5126
|
var useDeleteComment = () => {
|
|
5062
|
-
return (
|
|
5127
|
+
return useMutation21({
|
|
5063
5128
|
mutationFn: ({ data }) => form_service_default.deleteComment({
|
|
5064
5129
|
data
|
|
5065
5130
|
})
|
|
@@ -5068,9 +5133,9 @@ var useDeleteComment = () => {
|
|
|
5068
5133
|
var use_delete_comment_default = useDeleteComment;
|
|
5069
5134
|
|
|
5070
5135
|
// src/hooks/form/use-get-comment.ts
|
|
5071
|
-
|
|
5136
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
5072
5137
|
var useGetComment = ({ data, queryKey }) => {
|
|
5073
|
-
return (
|
|
5138
|
+
return useQuery3({
|
|
5074
5139
|
queryKey,
|
|
5075
5140
|
queryFn: () => form_service_default.getComment({ data }).then((res) => {
|
|
5076
5141
|
if (res) {
|
|
@@ -5084,13 +5149,13 @@ var useGetComment = ({ data, queryKey }) => {
|
|
|
5084
5149
|
var use_get_comment_default = useGetComment;
|
|
5085
5150
|
|
|
5086
5151
|
// src/hooks/form/use-get-form-view.ts
|
|
5087
|
-
|
|
5152
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
5088
5153
|
var useGetFormView = ({
|
|
5089
5154
|
data,
|
|
5090
5155
|
queryKey,
|
|
5091
5156
|
enabled
|
|
5092
5157
|
}) => {
|
|
5093
|
-
return (
|
|
5158
|
+
return useQuery4({
|
|
5094
5159
|
queryKey,
|
|
5095
5160
|
queryFn: () => form_service_default.getFormView({ data }).then((res) => {
|
|
5096
5161
|
if (res) {
|
|
@@ -5104,13 +5169,13 @@ var useGetFormView = ({
|
|
|
5104
5169
|
var use_get_form_view_default = useGetFormView;
|
|
5105
5170
|
|
|
5106
5171
|
// src/hooks/form/use-get-image.ts
|
|
5107
|
-
|
|
5172
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
5108
5173
|
var useGetImage = ({
|
|
5109
5174
|
data,
|
|
5110
5175
|
queryKey,
|
|
5111
5176
|
src
|
|
5112
5177
|
}) => {
|
|
5113
|
-
return (
|
|
5178
|
+
return useQuery5({
|
|
5114
5179
|
queryKey,
|
|
5115
5180
|
queryFn: () => form_service_default.getImage({ data }).then((res) => {
|
|
5116
5181
|
if (res) {
|
|
@@ -5124,9 +5189,9 @@ var useGetImage = ({
|
|
|
5124
5189
|
var use_get_image_default = useGetImage;
|
|
5125
5190
|
|
|
5126
5191
|
// src/hooks/form/use-send-comment.ts
|
|
5127
|
-
|
|
5192
|
+
import { useMutation as useMutation22 } from "@tanstack/react-query";
|
|
5128
5193
|
var useSendComment = () => {
|
|
5129
|
-
return (
|
|
5194
|
+
return useMutation22({
|
|
5130
5195
|
mutationFn: ({ data }) => form_service_default.sentComment({
|
|
5131
5196
|
data
|
|
5132
5197
|
})
|
|
@@ -5135,9 +5200,9 @@ var useSendComment = () => {
|
|
|
5135
5200
|
var use_send_comment_default = useSendComment;
|
|
5136
5201
|
|
|
5137
5202
|
// src/hooks/form/use-upload-image.ts
|
|
5138
|
-
|
|
5203
|
+
import { useMutation as useMutation23 } from "@tanstack/react-query";
|
|
5139
5204
|
var useUploadImage = () => {
|
|
5140
|
-
return (
|
|
5205
|
+
return useMutation23({
|
|
5141
5206
|
mutationFn: ({ data }) => form_service_default.uploadImage({
|
|
5142
5207
|
data
|
|
5143
5208
|
})
|
|
@@ -5146,18 +5211,18 @@ var useUploadImage = () => {
|
|
|
5146
5211
|
var use_upload_image_default = useUploadImage;
|
|
5147
5212
|
|
|
5148
5213
|
// src/hooks/model/use-delete.ts
|
|
5149
|
-
|
|
5214
|
+
import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
5150
5215
|
var useDelete = () => {
|
|
5151
|
-
return (
|
|
5216
|
+
return useMutation24({
|
|
5152
5217
|
mutationFn: ({ ids, model }) => model_service_default.delete({ ids, model })
|
|
5153
5218
|
});
|
|
5154
5219
|
};
|
|
5155
5220
|
var use_delete_default = useDelete;
|
|
5156
5221
|
|
|
5157
5222
|
// src/hooks/model/use-get-all.ts
|
|
5158
|
-
|
|
5223
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
5159
5224
|
var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
5160
|
-
return (
|
|
5225
|
+
return useQuery6({
|
|
5161
5226
|
queryKey,
|
|
5162
5227
|
queryFn: () => model_service_default.getAll({ data }).then((res) => {
|
|
5163
5228
|
if (res) {
|
|
@@ -5172,9 +5237,9 @@ var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
|
5172
5237
|
var use_get_all_default = useGetAll;
|
|
5173
5238
|
|
|
5174
5239
|
// src/hooks/model/use-get-conversion-rate.ts
|
|
5175
|
-
|
|
5240
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
5176
5241
|
var useGetConversionRate = () => {
|
|
5177
|
-
return (
|
|
5242
|
+
return useQuery7({
|
|
5178
5243
|
queryKey: ["currency-rate"],
|
|
5179
5244
|
queryFn: () => model_service_default.getConversionRate().then((res) => {
|
|
5180
5245
|
if (res) {
|
|
@@ -5187,9 +5252,9 @@ var useGetConversionRate = () => {
|
|
|
5187
5252
|
var use_get_conversion_rate_default = useGetConversionRate;
|
|
5188
5253
|
|
|
5189
5254
|
// src/hooks/model/use-get-currency.ts
|
|
5190
|
-
|
|
5255
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
5191
5256
|
var useGetCurrency = () => {
|
|
5192
|
-
return (
|
|
5257
|
+
return useQuery8({
|
|
5193
5258
|
queryKey: ["currency"],
|
|
5194
5259
|
queryFn: () => model_service_default.getCurrency().then((res) => {
|
|
5195
5260
|
if (res) {
|
|
@@ -5202,9 +5267,9 @@ var useGetCurrency = () => {
|
|
|
5202
5267
|
var use_get_currency_default = useGetCurrency;
|
|
5203
5268
|
|
|
5204
5269
|
// src/hooks/model/use-get-detail.ts
|
|
5205
|
-
|
|
5270
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
5206
5271
|
var useGetDetail = () => {
|
|
5207
|
-
return (
|
|
5272
|
+
return useMutation25({
|
|
5208
5273
|
mutationFn: ({
|
|
5209
5274
|
model,
|
|
5210
5275
|
ids,
|
|
@@ -5221,9 +5286,9 @@ var useGetDetail = () => {
|
|
|
5221
5286
|
var use_get_detail_default = useGetDetail;
|
|
5222
5287
|
|
|
5223
5288
|
// src/hooks/model/use-get-field-onchange.ts
|
|
5224
|
-
|
|
5289
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
5225
5290
|
var useGetFieldOnChange = ({ model }) => {
|
|
5226
|
-
return (
|
|
5291
|
+
return useQuery9({
|
|
5227
5292
|
queryKey: [`field-onchange-${model}`, model],
|
|
5228
5293
|
queryFn: () => model_service_default.getListFieldsOnchange({
|
|
5229
5294
|
model
|
|
@@ -5239,13 +5304,13 @@ var useGetFieldOnChange = ({ model }) => {
|
|
|
5239
5304
|
var use_get_field_onchange_default = useGetFieldOnChange;
|
|
5240
5305
|
|
|
5241
5306
|
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
5242
|
-
|
|
5307
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
5243
5308
|
var useGetListMyBankAccount = ({
|
|
5244
5309
|
domain,
|
|
5245
5310
|
spectification,
|
|
5246
5311
|
model
|
|
5247
5312
|
}) => {
|
|
5248
|
-
return (
|
|
5313
|
+
return useQuery10({
|
|
5249
5314
|
queryKey: ["bank-account", model, domain],
|
|
5250
5315
|
queryFn: () => model_service_default.getListMyBankAccount({
|
|
5251
5316
|
domain,
|
|
@@ -5263,10 +5328,6 @@ var use_get_list_my_bank_account_default = useGetListMyBankAccount;
|
|
|
5263
5328
|
|
|
5264
5329
|
// src/models/base-model/index.ts
|
|
5265
5330
|
var BaseModel = class {
|
|
5266
|
-
name;
|
|
5267
|
-
view;
|
|
5268
|
-
actContext;
|
|
5269
|
-
fields;
|
|
5270
5331
|
constructor(init) {
|
|
5271
5332
|
this.name = init.name;
|
|
5272
5333
|
this.view = init.view;
|
|
@@ -5281,21 +5342,22 @@ var BaseModel = class {
|
|
|
5281
5342
|
modelRoot
|
|
5282
5343
|
}) {
|
|
5283
5344
|
if (Array.isArray(fields)) {
|
|
5284
|
-
let spec = {
|
|
5345
|
+
let spec = __spreadValues({}, specification);
|
|
5285
5346
|
fields.forEach((field) => {
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
const
|
|
5347
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
5348
|
+
if (!(field == null ? void 0 : field.type_co) || (field == null ? void 0 : field.name) && (field == null ? void 0 : field.type_co) === "field" /* FIELD */) {
|
|
5349
|
+
if ((_a = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _a[field == null ? void 0 : field.name]) {
|
|
5350
|
+
if (((_c = (_b = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _b[field == null ? void 0 : field.name]) == null ? void 0 : _c.type) === "one2many" /* ONE2MANY */ || ((_e = (_d = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _d[field == null ? void 0 : field.name]) == null ? void 0 : _e.type) === "many2many" /* MANY2MANY */) {
|
|
5351
|
+
const relation = (_g = (_f = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _f[field == null ? void 0 : field.name]) == null ? void 0 : _g.relation;
|
|
5352
|
+
const modelRelation = modelsData == null ? void 0 : modelsData[relation];
|
|
5291
5353
|
if (modelRelation) {
|
|
5292
|
-
spec[field
|
|
5354
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5293
5355
|
fields: {}
|
|
5294
5356
|
};
|
|
5295
5357
|
if (modelRoot && modelRoot === relation) {
|
|
5296
|
-
spec[field
|
|
5358
|
+
spec[field == null ? void 0 : field.name].fields = { id: {} };
|
|
5297
5359
|
} else {
|
|
5298
|
-
spec[field
|
|
5360
|
+
spec[field == null ? void 0 : field.name].fields = this.getSpecificationByFields({
|
|
5299
5361
|
fields: Object.values(modelRelation),
|
|
5300
5362
|
specification: {},
|
|
5301
5363
|
modelsData,
|
|
@@ -5304,45 +5366,42 @@ var BaseModel = class {
|
|
|
5304
5366
|
});
|
|
5305
5367
|
}
|
|
5306
5368
|
} else {
|
|
5307
|
-
spec[field
|
|
5369
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5308
5370
|
fields: {
|
|
5309
5371
|
id: {},
|
|
5310
5372
|
display_name: {}
|
|
5311
5373
|
}
|
|
5312
5374
|
};
|
|
5313
5375
|
}
|
|
5314
|
-
} else if (modelsData
|
|
5315
|
-
spec[field
|
|
5316
|
-
fields: {
|
|
5376
|
+
} else if (((_i = (_h = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _h[field == null ? void 0 : field.name]) == null ? void 0 : _i.type) === "many2one" /* MANY2ONE */) {
|
|
5377
|
+
spec[field == null ? void 0 : field.name] = {
|
|
5378
|
+
fields: __spreadValues(__spreadValues(__spreadValues({
|
|
5317
5379
|
id: {},
|
|
5318
|
-
display_name: {}
|
|
5319
|
-
|
|
5320
|
-
...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
|
|
5321
|
-
...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
|
|
5322
|
-
}
|
|
5380
|
+
display_name: {}
|
|
5381
|
+
}, WIDGETAVATAR[field == null ? void 0 : field.widget] ? { image_256: {} } : {}), (field == null ? void 0 : field.name) === "currency_id" && (fields == null ? void 0 : fields.find((item) => (item == null ? void 0 : item.widget) === "monetary")) ? { symbol: {} } : {}), (field == null ? void 0 : field.widget) === "many2many_binary" ? { mimetype: {} } : {})
|
|
5323
5382
|
};
|
|
5324
5383
|
} else {
|
|
5325
|
-
spec[field
|
|
5384
|
+
spec[field == null ? void 0 : field.name] = {};
|
|
5326
5385
|
}
|
|
5327
5386
|
}
|
|
5328
|
-
} else if (field
|
|
5387
|
+
} else if ((field == null ? void 0 : field.type_co) === "group" /* GROUP */ || (field == null ? void 0 : field.type_co) === "div" /* DIV */ || (field == null ? void 0 : field.type_co) === "span" /* SPAN */) {
|
|
5329
5388
|
const specGroup = this.getSpecificationByFields({
|
|
5330
|
-
fields: field
|
|
5389
|
+
fields: field == null ? void 0 : field.fields,
|
|
5331
5390
|
specification: spec,
|
|
5332
5391
|
modelsData,
|
|
5333
5392
|
model
|
|
5334
5393
|
});
|
|
5335
|
-
spec = {
|
|
5336
|
-
} else if (field
|
|
5337
|
-
const relation = modelsData
|
|
5394
|
+
spec = __spreadValues(__spreadValues({}, spec), specGroup);
|
|
5395
|
+
} else if ((field == null ? void 0 : field.type_co) === "tree" /* TREE */ || (field == null ? void 0 : field.type_co) === "list" /* LIST */) {
|
|
5396
|
+
const relation = (_k = (_j = modelsData == null ? void 0 : modelsData[model]) == null ? void 0 : _j[field == null ? void 0 : field.name]) == null ? void 0 : _k.relation;
|
|
5338
5397
|
const specTreee = this.getSpecificationByFields({
|
|
5339
|
-
fields: field
|
|
5398
|
+
fields: field == null ? void 0 : field.fields,
|
|
5340
5399
|
specification: {},
|
|
5341
5400
|
modelsData,
|
|
5342
5401
|
model: relation,
|
|
5343
5402
|
modelRoot: model
|
|
5344
5403
|
});
|
|
5345
|
-
spec = {
|
|
5404
|
+
spec = __spreadProps(__spreadValues({}, spec), { [field == null ? void 0 : field.name]: { fields: specTreee } });
|
|
5346
5405
|
}
|
|
5347
5406
|
});
|
|
5348
5407
|
return spec;
|
|
@@ -5351,16 +5410,19 @@ var BaseModel = class {
|
|
|
5351
5410
|
}
|
|
5352
5411
|
}
|
|
5353
5412
|
getTreeProps() {
|
|
5354
|
-
|
|
5413
|
+
var _a, _b;
|
|
5414
|
+
const props = ((_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) || {};
|
|
5355
5415
|
return props;
|
|
5356
5416
|
}
|
|
5357
5417
|
getTreeFields() {
|
|
5358
|
-
|
|
5418
|
+
var _a, _b, _c;
|
|
5419
|
+
const fields = ((_c = (_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) == null ? void 0 : _c.fields) || [];
|
|
5359
5420
|
return fields;
|
|
5360
5421
|
}
|
|
5361
5422
|
getSpecification() {
|
|
5423
|
+
var _a;
|
|
5362
5424
|
const specInit = {};
|
|
5363
|
-
const modelData = this.view
|
|
5425
|
+
const modelData = ((_a = this.view) == null ? void 0 : _a.models) || {};
|
|
5364
5426
|
const specification = this.getSpecificationByFields({
|
|
5365
5427
|
fields: this.fields,
|
|
5366
5428
|
specification: specInit,
|
|
@@ -5376,7 +5438,7 @@ var base_model_default = BaseModel;
|
|
|
5376
5438
|
// src/hooks/model/use-model.ts
|
|
5377
5439
|
var useModel = () => {
|
|
5378
5440
|
const initModel = (modelData) => {
|
|
5379
|
-
switch (modelData
|
|
5441
|
+
switch (modelData == null ? void 0 : modelData.name) {
|
|
5380
5442
|
default:
|
|
5381
5443
|
return new base_model_default(modelData);
|
|
5382
5444
|
}
|
|
@@ -5397,9 +5459,9 @@ var useOdooDataTransform = () => {
|
|
|
5397
5459
|
var use_odoo_data_transform_default = useOdooDataTransform;
|
|
5398
5460
|
|
|
5399
5461
|
// src/hooks/model/use-onchange-form.ts
|
|
5400
|
-
|
|
5462
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
5401
5463
|
var useOnChangeForm = () => {
|
|
5402
|
-
return (
|
|
5464
|
+
return useMutation26({
|
|
5403
5465
|
mutationFn: ({
|
|
5404
5466
|
ids,
|
|
5405
5467
|
model,
|
|
@@ -5420,9 +5482,9 @@ var useOnChangeForm = () => {
|
|
|
5420
5482
|
var use_onchange_form_default = useOnChangeForm;
|
|
5421
5483
|
|
|
5422
5484
|
// src/hooks/model/use-save.ts
|
|
5423
|
-
|
|
5485
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
5424
5486
|
var useSave = () => {
|
|
5425
|
-
return (
|
|
5487
|
+
return useMutation27({
|
|
5426
5488
|
mutationFn: ({
|
|
5427
5489
|
ids,
|
|
5428
5490
|
model,
|
|
@@ -5436,18 +5498,18 @@ var useSave = () => {
|
|
|
5436
5498
|
var use_save_default = useSave;
|
|
5437
5499
|
|
|
5438
5500
|
// src/hooks/user/use-get-profile.ts
|
|
5439
|
-
|
|
5501
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
5440
5502
|
var useGetProfile = (path) => {
|
|
5441
|
-
return (
|
|
5503
|
+
return useMutation28({
|
|
5442
5504
|
mutationFn: () => user_service_default.getProfile(path)
|
|
5443
5505
|
});
|
|
5444
5506
|
};
|
|
5445
5507
|
var use_get_profile_default = useGetProfile;
|
|
5446
5508
|
|
|
5447
5509
|
// src/hooks/user/use-get-user.ts
|
|
5448
|
-
|
|
5510
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
5449
5511
|
var useGetUser = () => {
|
|
5450
|
-
return (
|
|
5512
|
+
return useMutation29({
|
|
5451
5513
|
mutationFn: ({ id, context }) => user_service_default.getUser({
|
|
5452
5514
|
id,
|
|
5453
5515
|
context
|
|
@@ -5457,9 +5519,9 @@ var useGetUser = () => {
|
|
|
5457
5519
|
var use_get_user_default = useGetUser;
|
|
5458
5520
|
|
|
5459
5521
|
// src/hooks/user/use-switch-locale.ts
|
|
5460
|
-
|
|
5522
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
5461
5523
|
var useSwitchLocale = () => {
|
|
5462
|
-
return (
|
|
5524
|
+
return useMutation30({
|
|
5463
5525
|
mutationFn: ({ data }) => {
|
|
5464
5526
|
return user_service_default.switchUserLocale({
|
|
5465
5527
|
id: data.id,
|
|
@@ -5471,9 +5533,9 @@ var useSwitchLocale = () => {
|
|
|
5471
5533
|
var use_switch_locale_default = useSwitchLocale;
|
|
5472
5534
|
|
|
5473
5535
|
// src/hooks/view/use-button.ts
|
|
5474
|
-
|
|
5536
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
5475
5537
|
var useButton = () => {
|
|
5476
|
-
return (
|
|
5538
|
+
return useMutation31({
|
|
5477
5539
|
mutationFn: ({
|
|
5478
5540
|
model,
|
|
5479
5541
|
ids,
|
|
@@ -5493,9 +5555,9 @@ var useButton = () => {
|
|
|
5493
5555
|
var use_button_default = useButton;
|
|
5494
5556
|
|
|
5495
5557
|
// src/hooks/view/use-duplicate-record.ts
|
|
5496
|
-
|
|
5558
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
5497
5559
|
var useDuplicateRecord = () => {
|
|
5498
|
-
return (
|
|
5560
|
+
return useMutation32({
|
|
5499
5561
|
mutationFn: ({
|
|
5500
5562
|
id,
|
|
5501
5563
|
model,
|
|
@@ -5510,7 +5572,7 @@ var useDuplicateRecord = () => {
|
|
|
5510
5572
|
var use_duplicate_record_default = useDuplicateRecord;
|
|
5511
5573
|
|
|
5512
5574
|
// src/hooks/view/use-get-action-detail.ts
|
|
5513
|
-
|
|
5575
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
5514
5576
|
var useGetActionDetail = ({
|
|
5515
5577
|
aid,
|
|
5516
5578
|
context,
|
|
@@ -5521,22 +5583,22 @@ var useGetActionDetail = ({
|
|
|
5521
5583
|
}) => {
|
|
5522
5584
|
const data = {
|
|
5523
5585
|
id,
|
|
5524
|
-
model: model
|
|
5586
|
+
model: model != null ? model : "",
|
|
5525
5587
|
context
|
|
5526
5588
|
};
|
|
5527
|
-
return (
|
|
5589
|
+
return useQuery11({
|
|
5528
5590
|
queryKey,
|
|
5529
|
-
queryFn:
|
|
5591
|
+
queryFn: () => __async(null, null, function* () {
|
|
5530
5592
|
if (aid) {
|
|
5531
|
-
const res =
|
|
5593
|
+
const res = yield view_service_default.getActionDetail(aid, context);
|
|
5532
5594
|
if (res && res.length > 0) {
|
|
5533
5595
|
return res[0];
|
|
5534
5596
|
}
|
|
5535
5597
|
} else {
|
|
5536
|
-
const res =
|
|
5598
|
+
const res = yield form_service_default.getFormView({ data });
|
|
5537
5599
|
return res;
|
|
5538
5600
|
}
|
|
5539
|
-
},
|
|
5601
|
+
}),
|
|
5540
5602
|
enabled,
|
|
5541
5603
|
refetchOnWindowFocus: false,
|
|
5542
5604
|
staleTime: Infinity
|
|
@@ -5545,9 +5607,9 @@ var useGetActionDetail = ({
|
|
|
5545
5607
|
var use_get_action_detail_default = useGetActionDetail;
|
|
5546
5608
|
|
|
5547
5609
|
// src/hooks/view/use-get-calendar.ts
|
|
5548
|
-
|
|
5610
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
5549
5611
|
var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
5550
|
-
return (
|
|
5612
|
+
return useQuery12({
|
|
5551
5613
|
queryKey,
|
|
5552
5614
|
queryFn: () => model_service_default.getListCalendar({ data: listDataProps }).then((res) => {
|
|
5553
5615
|
if (res) {
|
|
@@ -5563,12 +5625,12 @@ var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
|
5563
5625
|
var use_get_calendar_default = useGetCalendar;
|
|
5564
5626
|
|
|
5565
5627
|
// src/hooks/view/use-get-groups.ts
|
|
5566
|
-
|
|
5628
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
5567
5629
|
var useGetGroups = ({
|
|
5568
5630
|
model,
|
|
5569
5631
|
width_context
|
|
5570
5632
|
}) => {
|
|
5571
|
-
return (
|
|
5633
|
+
return useQuery13({
|
|
5572
5634
|
queryKey: [model, width_context],
|
|
5573
5635
|
queryFn: () => kanban_service_default.getGroups({
|
|
5574
5636
|
model,
|
|
@@ -5585,9 +5647,9 @@ var useGetGroups = ({
|
|
|
5585
5647
|
var use_get_groups_default = useGetGroups;
|
|
5586
5648
|
|
|
5587
5649
|
// src/hooks/view/use-get-list-data.ts
|
|
5588
|
-
|
|
5650
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
5589
5651
|
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5590
|
-
return (
|
|
5652
|
+
return useQuery14({
|
|
5591
5653
|
queryKey,
|
|
5592
5654
|
queryFn: () => model_service_default.getAll({ data: listDataProps }).then((res) => {
|
|
5593
5655
|
if (res) {
|
|
@@ -5603,13 +5665,14 @@ var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
|
5603
5665
|
var use_get_list_data_default = useGetListData;
|
|
5604
5666
|
|
|
5605
5667
|
// src/hooks/view/use-get-menu.ts
|
|
5606
|
-
|
|
5668
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
5607
5669
|
var useGetMenu = (context, enabled) => {
|
|
5608
|
-
return (
|
|
5670
|
+
return useQuery15({
|
|
5609
5671
|
queryKey: ["menus" /* MENU */, context],
|
|
5610
5672
|
queryFn: () => view_service_default.getMenu(context).then((res) => {
|
|
5611
|
-
|
|
5612
|
-
|
|
5673
|
+
var _a;
|
|
5674
|
+
if (res && (res == null ? void 0 : res.records) && ((_a = res == null ? void 0 : res.records) == null ? void 0 : _a.length) > 0) {
|
|
5675
|
+
return res == null ? void 0 : res.records;
|
|
5613
5676
|
}
|
|
5614
5677
|
return [];
|
|
5615
5678
|
}),
|
|
@@ -5621,9 +5684,9 @@ var useGetMenu = (context, enabled) => {
|
|
|
5621
5684
|
var use_get_menu_default = useGetMenu;
|
|
5622
5685
|
|
|
5623
5686
|
// src/hooks/view/use-get-print-report.ts
|
|
5624
|
-
|
|
5687
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
5625
5688
|
var useGetPrintReport = () => {
|
|
5626
|
-
return (
|
|
5689
|
+
return useMutation33({
|
|
5627
5690
|
mutationFn: ({ id }) => action_service_default.getPrintReportName({
|
|
5628
5691
|
id
|
|
5629
5692
|
})
|
|
@@ -5632,14 +5695,14 @@ var useGetPrintReport = () => {
|
|
|
5632
5695
|
var use_get_print_report_default = useGetPrintReport;
|
|
5633
5696
|
|
|
5634
5697
|
// src/hooks/view/use-get-progress-bar.ts
|
|
5635
|
-
|
|
5698
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
5636
5699
|
var useGetProGressBar = ({
|
|
5637
5700
|
field,
|
|
5638
5701
|
color,
|
|
5639
5702
|
model,
|
|
5640
5703
|
width_context
|
|
5641
5704
|
}) => {
|
|
5642
|
-
return (
|
|
5705
|
+
return useQuery16({
|
|
5643
5706
|
queryKey: [],
|
|
5644
5707
|
queryFn: () => kanban_service_default.getProgressBar({
|
|
5645
5708
|
field,
|
|
@@ -5658,13 +5721,13 @@ var useGetProGressBar = ({
|
|
|
5658
5721
|
var use_get_progress_bar_default = useGetProGressBar;
|
|
5659
5722
|
|
|
5660
5723
|
// src/hooks/view/use-get-selection.ts
|
|
5661
|
-
|
|
5724
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
5662
5725
|
var useGetSelection = ({
|
|
5663
5726
|
data,
|
|
5664
5727
|
queryKey,
|
|
5665
5728
|
enabled
|
|
5666
5729
|
}) => {
|
|
5667
|
-
return (
|
|
5730
|
+
return useQuery17({
|
|
5668
5731
|
queryKey,
|
|
5669
5732
|
queryFn: () => view_service_default.getSelectionItem({ data }),
|
|
5670
5733
|
enabled,
|
|
@@ -5674,9 +5737,9 @@ var useGetSelection = ({
|
|
|
5674
5737
|
var use_get_selection_default = useGetSelection;
|
|
5675
5738
|
|
|
5676
5739
|
// src/hooks/view/use-get-view.ts
|
|
5677
|
-
|
|
5740
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
5678
5741
|
var useGetView = (viewParams, actData) => {
|
|
5679
|
-
return (
|
|
5742
|
+
return useQuery18({
|
|
5680
5743
|
queryKey: ["get_view_by_action" /* GET_VIEW_BY_ACTION */, viewParams],
|
|
5681
5744
|
queryFn: () => view_service_default.getView(viewParams),
|
|
5682
5745
|
enabled: !!actData,
|
|
@@ -5687,9 +5750,9 @@ var useGetView = (viewParams, actData) => {
|
|
|
5687
5750
|
var use_get_view_default = useGetView;
|
|
5688
5751
|
|
|
5689
5752
|
// src/hooks/view/use-load-action.ts
|
|
5690
|
-
|
|
5753
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
5691
5754
|
var useLoadAction = () => {
|
|
5692
|
-
return (
|
|
5755
|
+
return useMutation34({
|
|
5693
5756
|
mutationFn: ({
|
|
5694
5757
|
idAction,
|
|
5695
5758
|
context
|
|
@@ -5704,9 +5767,9 @@ var useLoadAction = () => {
|
|
|
5704
5767
|
var use_load_action_default = useLoadAction;
|
|
5705
5768
|
|
|
5706
5769
|
// src/hooks/view/use-load-message.ts
|
|
5707
|
-
|
|
5770
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
5708
5771
|
var useLoadMessage = () => {
|
|
5709
|
-
return (
|
|
5772
|
+
return useQuery19({
|
|
5710
5773
|
queryKey: [`load-message-failure`],
|
|
5711
5774
|
queryFn: () => view_service_default.loadMessages(),
|
|
5712
5775
|
refetchOnWindowFocus: false
|
|
@@ -5715,9 +5778,9 @@ var useLoadMessage = () => {
|
|
|
5715
5778
|
var use_load_message_default = useLoadMessage;
|
|
5716
5779
|
|
|
5717
5780
|
// src/hooks/view/use-print.ts
|
|
5718
|
-
|
|
5781
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
5719
5782
|
var usePrint = () => {
|
|
5720
|
-
return (
|
|
5783
|
+
return useMutation35({
|
|
5721
5784
|
mutationFn: ({ id, report, db }) => action_service_default.print({
|
|
5722
5785
|
id,
|
|
5723
5786
|
report,
|
|
@@ -5728,9 +5791,9 @@ var usePrint = () => {
|
|
|
5728
5791
|
var use_print_default = usePrint;
|
|
5729
5792
|
|
|
5730
5793
|
// src/hooks/view/use-remove-row.ts
|
|
5731
|
-
|
|
5794
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
5732
5795
|
var useRemoveRow = () => {
|
|
5733
|
-
return (
|
|
5796
|
+
return useMutation36({
|
|
5734
5797
|
mutationFn: ({
|
|
5735
5798
|
model,
|
|
5736
5799
|
ids,
|
|
@@ -5745,9 +5808,9 @@ var useRemoveRow = () => {
|
|
|
5745
5808
|
var use_remove_row_default = useRemoveRow;
|
|
5746
5809
|
|
|
5747
5810
|
// src/hooks/view/use-resequence.ts
|
|
5748
|
-
|
|
5811
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
5749
5812
|
var useGetResequence = (model, resIds, context, offset) => {
|
|
5750
|
-
return (
|
|
5813
|
+
return useQuery20({
|
|
5751
5814
|
queryKey: [],
|
|
5752
5815
|
queryFn: () => view_service_default.getResequence({
|
|
5753
5816
|
model,
|
|
@@ -5762,9 +5825,9 @@ var useGetResequence = (model, resIds, context, offset) => {
|
|
|
5762
5825
|
var use_resequence_default = useGetResequence;
|
|
5763
5826
|
|
|
5764
5827
|
// src/hooks/view/use-run-action.ts
|
|
5765
|
-
|
|
5828
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
5766
5829
|
var useRunAction = () => {
|
|
5767
|
-
return (
|
|
5830
|
+
return useMutation37({
|
|
5768
5831
|
mutationFn: ({
|
|
5769
5832
|
idAction,
|
|
5770
5833
|
context
|
|
@@ -5777,9 +5840,9 @@ var useRunAction = () => {
|
|
|
5777
5840
|
var use_run_action_default = useRunAction;
|
|
5778
5841
|
|
|
5779
5842
|
// src/hooks/view/use-signin-sso.ts
|
|
5780
|
-
|
|
5843
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
5781
5844
|
var useSignInSSO = () => {
|
|
5782
|
-
return (
|
|
5845
|
+
return useMutation38({
|
|
5783
5846
|
mutationFn: ({
|
|
5784
5847
|
redirect_uri,
|
|
5785
5848
|
state,
|
|
@@ -5800,9 +5863,9 @@ var useSignInSSO = () => {
|
|
|
5800
5863
|
var use_signin_sso_default = useSignInSSO;
|
|
5801
5864
|
|
|
5802
5865
|
// src/hooks/view/use-verify-2FA.ts
|
|
5803
|
-
|
|
5866
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
5804
5867
|
var useVerify2FA = () => {
|
|
5805
|
-
return (
|
|
5868
|
+
return useMutation39({
|
|
5806
5869
|
mutationFn: ({
|
|
5807
5870
|
method,
|
|
5808
5871
|
with_context,
|
|
@@ -5823,9 +5886,9 @@ var useVerify2FA = () => {
|
|
|
5823
5886
|
var use_verify_2FA_default = useVerify2FA;
|
|
5824
5887
|
|
|
5825
5888
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
5826
|
-
|
|
5889
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
5827
5890
|
var useGet2FAMethods = () => {
|
|
5828
|
-
return (
|
|
5891
|
+
return useMutation40({
|
|
5829
5892
|
mutationFn: ({
|
|
5830
5893
|
method,
|
|
5831
5894
|
with_context
|
|
@@ -5840,9 +5903,9 @@ var useGet2FAMethods = () => {
|
|
|
5840
5903
|
var uset_get_2FA_method_default = useGet2FAMethods;
|
|
5841
5904
|
|
|
5842
5905
|
// src/hooks/view/use-get-fields-view-security.ts
|
|
5843
|
-
|
|
5906
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
5844
5907
|
var useGetFieldsViewSecurity = () => {
|
|
5845
|
-
return (
|
|
5908
|
+
return useMutation41({
|
|
5846
5909
|
mutationFn: ({
|
|
5847
5910
|
method,
|
|
5848
5911
|
token,
|
|
@@ -5859,9 +5922,9 @@ var useGetFieldsViewSecurity = () => {
|
|
|
5859
5922
|
var use_get_fields_view_security_default = useGetFieldsViewSecurity;
|
|
5860
5923
|
|
|
5861
5924
|
// src/hooks/view/use-grant-access.ts
|
|
5862
|
-
|
|
5925
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
5863
5926
|
var useGrantAccess = () => {
|
|
5864
|
-
return (
|
|
5927
|
+
return useMutation42({
|
|
5865
5928
|
mutationFn: ({
|
|
5866
5929
|
redirect_uri,
|
|
5867
5930
|
state,
|
|
@@ -5880,9 +5943,9 @@ var useGrantAccess = () => {
|
|
|
5880
5943
|
var use_grant_access_default = useGrantAccess;
|
|
5881
5944
|
|
|
5882
5945
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
5883
|
-
|
|
5946
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
5884
5947
|
var useRemoveTotpSetup = () => {
|
|
5885
|
-
return (
|
|
5948
|
+
return useMutation43({
|
|
5886
5949
|
mutationFn: ({ method, token }) => {
|
|
5887
5950
|
return view_service_default.removeTotpSetUp({
|
|
5888
5951
|
method,
|
|
@@ -5894,9 +5957,9 @@ var useRemoveTotpSetup = () => {
|
|
|
5894
5957
|
var use_remove_totp_setup_default = useRemoveTotpSetup;
|
|
5895
5958
|
|
|
5896
5959
|
// src/hooks/view/use-request-setup-totp.ts
|
|
5897
|
-
|
|
5960
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
5898
5961
|
var useRequestSetupTotp = () => {
|
|
5899
|
-
return (
|
|
5962
|
+
return useMutation44({
|
|
5900
5963
|
mutationFn: ({ method, token }) => {
|
|
5901
5964
|
return view_service_default.requestSetupTotp({
|
|
5902
5965
|
method,
|
|
@@ -5908,9 +5971,9 @@ var useRequestSetupTotp = () => {
|
|
|
5908
5971
|
var use_request_setup_totp_default = useRequestSetupTotp;
|
|
5909
5972
|
|
|
5910
5973
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
5911
|
-
|
|
5974
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
5912
5975
|
var useSettingsWebRead2fa = () => {
|
|
5913
|
-
return (
|
|
5976
|
+
return useMutation45({
|
|
5914
5977
|
mutationFn: ({
|
|
5915
5978
|
method,
|
|
5916
5979
|
token,
|
|
@@ -5929,9 +5992,9 @@ var useSettingsWebRead2fa = () => {
|
|
|
5929
5992
|
var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
|
|
5930
5993
|
|
|
5931
5994
|
// src/hooks/view/use-verify-totp.ts
|
|
5932
|
-
|
|
5995
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
5933
5996
|
var useVerifyTotp = () => {
|
|
5934
|
-
return (
|
|
5997
|
+
return useMutation46({
|
|
5935
5998
|
mutationFn: ({
|
|
5936
5999
|
method,
|
|
5937
6000
|
action_token,
|
|
@@ -5946,74 +6009,73 @@ var useVerifyTotp = () => {
|
|
|
5946
6009
|
});
|
|
5947
6010
|
};
|
|
5948
6011
|
var use_verify_totp_default = useVerifyTotp;
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
});
|
|
6012
|
+
export {
|
|
6013
|
+
use_button_default as useButton,
|
|
6014
|
+
use_change_status_default as useChangeStatus,
|
|
6015
|
+
use_delete_default as useDelete,
|
|
6016
|
+
use_delete_comment_default as useDeleteComment,
|
|
6017
|
+
use_duplicate_record_default as useDuplicateRecord,
|
|
6018
|
+
uss_execute_import_default as useExecuteImport,
|
|
6019
|
+
use_export_excel_default as useExportExcel,
|
|
6020
|
+
use_forgot_password_default as useForgotPassword,
|
|
6021
|
+
use_forgotpassword_sso_default as useForgotPasswordSSO,
|
|
6022
|
+
uset_get_2FA_method_default as useGet2FAMethods,
|
|
6023
|
+
use_get_access_by_code_default as useGetAccessByCode,
|
|
6024
|
+
use_get_action_detail_default as useGetActionDetail,
|
|
6025
|
+
use_get_all_default as useGetAll,
|
|
6026
|
+
use_get_calendar_default as useGetCalendar,
|
|
6027
|
+
use_get_comment_default as useGetComment,
|
|
6028
|
+
use_get_company_info_default as useGetCompanyInfo,
|
|
6029
|
+
use_get_conversion_rate_default as useGetConversionRate,
|
|
6030
|
+
use_get_currency_default as useGetCurrency,
|
|
6031
|
+
use_get_current_company_default as useGetCurrentCompany,
|
|
6032
|
+
use_get_detail_default as useGetDetail,
|
|
6033
|
+
use_get_field_export_default as useGetFieldExport,
|
|
6034
|
+
use_get_field_onchange_default as useGetFieldOnChange,
|
|
6035
|
+
use_get_fields_view_security_default as useGetFieldsViewSecurity,
|
|
6036
|
+
use_get_file_excel_default as useGetFileExcel,
|
|
6037
|
+
use_get_form_view_default as useGetFormView,
|
|
6038
|
+
use_get_groups_default as useGetGroups,
|
|
6039
|
+
use_get_image_default as useGetImage,
|
|
6040
|
+
use_get_list_company_default as useGetListCompany,
|
|
6041
|
+
use_get_list_data_default as useGetListData,
|
|
6042
|
+
use_get_list_my_bank_account_default as useGetListMyBankAccount,
|
|
6043
|
+
use_get_menu_default as useGetMenu,
|
|
6044
|
+
use_get_print_report_default as useGetPrintReport,
|
|
6045
|
+
use_get_progress_bar_default as useGetProGressBar,
|
|
6046
|
+
use_get_profile_default as useGetProfile,
|
|
6047
|
+
use_get_provider_default as useGetProvider,
|
|
6048
|
+
use_resequence_default as useGetResequence,
|
|
6049
|
+
use_get_selection_default as useGetSelection,
|
|
6050
|
+
use_get_user_default as useGetUser,
|
|
6051
|
+
use_get_view_default as useGetView,
|
|
6052
|
+
use_grant_access_default as useGrantAccess,
|
|
6053
|
+
use_isvalid_token_default as useIsValidToken,
|
|
6054
|
+
use_load_action_default as useLoadAction,
|
|
6055
|
+
use_load_message_default as useLoadMessage,
|
|
6056
|
+
use_login_credential_default as useLoginCredential,
|
|
6057
|
+
use_login_socical_default as useLoginSocial,
|
|
6058
|
+
use_logout_default as useLogout,
|
|
6059
|
+
use_model_default as useModel,
|
|
6060
|
+
use_odoo_data_transform_default as useOdooDataTransform,
|
|
6061
|
+
use_onchange_form_default as useOnChangeForm,
|
|
6062
|
+
use_parse_preview_default as useParsePreview,
|
|
6063
|
+
use_print_default as usePrint,
|
|
6064
|
+
use_remove_row_default as useRemoveRow,
|
|
6065
|
+
use_remove_totp_setup_default as useRemoveTotpSetup,
|
|
6066
|
+
use_request_setup_totp_default as useRequestSetupTotp,
|
|
6067
|
+
use_reset_password_default as useResetPassword,
|
|
6068
|
+
use_reset_password_sso_default as useResetPasswordSSO,
|
|
6069
|
+
use_run_action_default as useRunAction,
|
|
6070
|
+
use_save_default as useSave,
|
|
6071
|
+
use_send_comment_default as useSendComment,
|
|
6072
|
+
use_settings_web_read_2fa_default as useSettingsWebRead2fa,
|
|
6073
|
+
use_signin_sso_default as useSignInSSO,
|
|
6074
|
+
use_switch_locale_default as useSwitchLocale,
|
|
6075
|
+
use_update_password_default as useUpdatePassword,
|
|
6076
|
+
use_upload_file_default as useUploadFile,
|
|
6077
|
+
use_upload_id_file_default as useUploadIdFile,
|
|
6078
|
+
use_upload_image_default as useUploadImage,
|
|
6079
|
+
use_verify_2FA_default as useVerify2FA,
|
|
6080
|
+
use_verify_totp_default as useVerifyTotp
|
|
6081
|
+
};
|