@fctc/interface-logic 1.5.7 → 1.5.9
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.d.cts → configs.d.mts} +1 -2
- package/dist/configs.d.ts +0 -1
- package/dist/configs.js +146 -124
- package/dist/{configs.cjs → configs.mjs} +111 -161
- package/dist/constants.js +41 -2
- package/dist/{constants.cjs → constants.mjs} +2 -40
- package/dist/{environment.d.cts → environment.d.mts} +1 -4
- package/dist/environment.d.ts +1 -4
- package/dist/environment.js +207 -189
- package/dist/{environment.cjs → environment.mjs} +172 -230
- package/dist/{hooks.d.cts → hooks.d.mts} +7 -2
- package/dist/hooks.d.ts +6 -1
- package/dist/hooks.js +1771 -1807
- package/dist/{hooks.cjs → hooks.mjs} +1674 -1915
- package/dist/{provider.d.cts → provider.d.mts} +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +608 -629
- package/dist/{provider.cjs → provider.mjs} +574 -669
- package/dist/{services.d.cts → services.d.mts} +2 -1
- package/dist/services.d.ts +1 -0
- package/dist/services.js +1467 -1580
- package/dist/{services.cjs → services.mjs} +1428 -1627
- package/dist/{store.d.cts → store.d.mts} +155 -127
- package/dist/store.d.ts +155 -127
- package/dist/store.js +131 -41
- package/dist/{store.cjs → store.mjs} +30 -146
- package/dist/{types.d.cts → types.d.mts} +1 -1
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/{utils.d.cts → utils.d.mts} +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +176 -135
- package/dist/{utils.cjs → utils.mjs} +115 -202
- package/package.json +81 -82
- package/dist/types.cjs +0 -17
- /package/dist/{constants.d.cts → constants.d.mts} +0 -0
- /package/dist/{view-type-BGJfDe73.d.cts → view-type-BGJfDe73.d.mts} +0 -0
|
@@ -1,145 +1,5 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __pow = Math.pow;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __export = (target, all) => {
|
|
26
|
-
for (var name in all)
|
|
27
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
-
for (let key of __getOwnPropNames(from))
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
-
var __async = (__this, __arguments, generator) => {
|
|
47
|
-
return new Promise((resolve, reject) => {
|
|
48
|
-
var fulfilled = (value) => {
|
|
49
|
-
try {
|
|
50
|
-
step(generator.next(value));
|
|
51
|
-
} catch (e) {
|
|
52
|
-
reject(e);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var rejected = (value) => {
|
|
56
|
-
try {
|
|
57
|
-
step(generator.throw(value));
|
|
58
|
-
} catch (e) {
|
|
59
|
-
reject(e);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
63
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// src/hooks.ts
|
|
68
|
-
var hooks_exports = {};
|
|
69
|
-
__export(hooks_exports, {
|
|
70
|
-
useButton: () => use_button_default,
|
|
71
|
-
useChangeStatus: () => use_change_status_default,
|
|
72
|
-
useDelete: () => use_delete_default,
|
|
73
|
-
useDeleteComment: () => use_delete_comment_default,
|
|
74
|
-
useDuplicateRecord: () => use_duplicate_record_default,
|
|
75
|
-
useExecuteImport: () => uss_execute_import_default,
|
|
76
|
-
useExportExcel: () => use_export_excel_default,
|
|
77
|
-
useForgotPassword: () => use_forgot_password_default,
|
|
78
|
-
useForgotPasswordSSO: () => use_forgotpassword_sso_default,
|
|
79
|
-
useGet2FAMethods: () => uset_get_2FA_method_default,
|
|
80
|
-
useGetAccessByCode: () => use_get_access_by_code_default,
|
|
81
|
-
useGetActionDetail: () => use_get_action_detail_default,
|
|
82
|
-
useGetAll: () => use_get_all_default,
|
|
83
|
-
useGetCalendar: () => use_get_calendar_default,
|
|
84
|
-
useGetComment: () => use_get_comment_default,
|
|
85
|
-
useGetCompanyInfo: () => use_get_company_info_default,
|
|
86
|
-
useGetConversionRate: () => use_get_conversion_rate_default,
|
|
87
|
-
useGetCurrency: () => use_get_currency_default,
|
|
88
|
-
useGetCurrentCompany: () => use_get_current_company_default,
|
|
89
|
-
useGetDetail: () => use_get_detail_default,
|
|
90
|
-
useGetFieldExport: () => use_get_field_export_default,
|
|
91
|
-
useGetFieldOnChange: () => use_get_field_onchange_default,
|
|
92
|
-
useGetFieldsViewSecurity: () => use_get_fields_view_security_default,
|
|
93
|
-
useGetFileExcel: () => use_get_file_excel_default,
|
|
94
|
-
useGetFormView: () => use_get_form_view_default,
|
|
95
|
-
useGetGroups: () => use_get_groups_default,
|
|
96
|
-
useGetImage: () => use_get_image_default,
|
|
97
|
-
useGetListCompany: () => use_get_list_company_default,
|
|
98
|
-
useGetListData: () => use_get_list_data_default,
|
|
99
|
-
useGetListMyBankAccount: () => use_get_list_my_bank_account_default,
|
|
100
|
-
useGetMenu: () => use_get_menu_default,
|
|
101
|
-
useGetPrintReport: () => use_get_print_report_default,
|
|
102
|
-
useGetProGressBar: () => use_get_progress_bar_default,
|
|
103
|
-
useGetProfile: () => use_get_profile_default,
|
|
104
|
-
useGetProvider: () => use_get_provider_default,
|
|
105
|
-
useGetResequence: () => use_resequence_default,
|
|
106
|
-
useGetSelection: () => use_get_selection_default,
|
|
107
|
-
useGetUser: () => use_get_user_default,
|
|
108
|
-
useGetView: () => use_get_view_default,
|
|
109
|
-
useGrantAccess: () => use_grant_access_default,
|
|
110
|
-
useIsValidToken: () => use_isvalid_token_default,
|
|
111
|
-
useLoadAction: () => use_load_action_default,
|
|
112
|
-
useLoadMessage: () => use_load_message_default,
|
|
113
|
-
useLoginCredential: () => use_login_credential_default,
|
|
114
|
-
useLoginSocial: () => use_login_socical_default,
|
|
115
|
-
useLogout: () => use_logout_default,
|
|
116
|
-
useModel: () => use_model_default,
|
|
117
|
-
useOdooDataTransform: () => use_odoo_data_transform_default,
|
|
118
|
-
useOnChangeForm: () => use_onchange_form_default,
|
|
119
|
-
useParsePreview: () => use_parse_preview_default,
|
|
120
|
-
usePrint: () => use_print_default,
|
|
121
|
-
useRemoveRow: () => use_remove_row_default,
|
|
122
|
-
useRemoveTotpSetup: () => use_remove_totp_setup_default,
|
|
123
|
-
useRequestSetupTotp: () => use_request_setup_totp_default,
|
|
124
|
-
useResetPassword: () => use_reset_password_default,
|
|
125
|
-
useResetPasswordSSO: () => use_reset_password_sso_default,
|
|
126
|
-
useRunAction: () => use_run_action_default,
|
|
127
|
-
useSave: () => use_save_default,
|
|
128
|
-
useSendComment: () => use_send_comment_default,
|
|
129
|
-
useSettingsWebRead2fa: () => use_settings_web_read_2fa_default,
|
|
130
|
-
useSignInSSO: () => use_signin_sso_default,
|
|
131
|
-
useSwitchLocale: () => use_switch_locale_default,
|
|
132
|
-
useUpdatePassword: () => use_update_password_default,
|
|
133
|
-
useUploadFile: () => use_upload_file_default,
|
|
134
|
-
useUploadIdFile: () => use_upload_id_file_default,
|
|
135
|
-
useUploadImage: () => use_upload_image_default,
|
|
136
|
-
useVerify2FA: () => use_verify_2FA_default,
|
|
137
|
-
useVerifyTotp: () => use_verify_totp_default
|
|
138
|
-
});
|
|
139
|
-
module.exports = __toCommonJS(hooks_exports);
|
|
140
|
-
|
|
141
1
|
// src/hooks/auth/use-forgot-password.ts
|
|
142
|
-
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
143
3
|
|
|
144
4
|
// src/constants/api/uri-constant.ts
|
|
145
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -172,10 +32,10 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
172
32
|
})(UriConstants || {});
|
|
173
33
|
|
|
174
34
|
// src/configs/axios-client.ts
|
|
175
|
-
|
|
35
|
+
import axios from "axios";
|
|
176
36
|
|
|
177
37
|
// src/utils/format.ts
|
|
178
|
-
|
|
38
|
+
import moment from "moment";
|
|
179
39
|
|
|
180
40
|
// src/constants/widget/widget-avatar-constant.ts
|
|
181
41
|
var WIDGETAVATAR = /* @__PURE__ */ ((WIDGETAVATAR2) => {
|
|
@@ -1262,6 +1122,22 @@ var PyRelativeDelta = class _PyRelativeDelta {
|
|
|
1262
1122
|
this.microsecond = params.microsecond;
|
|
1263
1123
|
this.weekday = params.weekday;
|
|
1264
1124
|
}
|
|
1125
|
+
years;
|
|
1126
|
+
months;
|
|
1127
|
+
days;
|
|
1128
|
+
hours;
|
|
1129
|
+
minutes;
|
|
1130
|
+
seconds;
|
|
1131
|
+
microseconds;
|
|
1132
|
+
leapDays;
|
|
1133
|
+
year;
|
|
1134
|
+
month;
|
|
1135
|
+
day;
|
|
1136
|
+
hour;
|
|
1137
|
+
minute;
|
|
1138
|
+
second;
|
|
1139
|
+
microsecond;
|
|
1140
|
+
weekday;
|
|
1265
1141
|
negate() {
|
|
1266
1142
|
return new _PyRelativeDelta(this, -1);
|
|
1267
1143
|
}
|
|
@@ -1376,7 +1252,7 @@ function execOnIterable(iterable, func) {
|
|
|
1376
1252
|
if (typeof iterable === "object" && !Array.isArray(iterable) && !(iterable instanceof Set)) {
|
|
1377
1253
|
iterable = Object.keys(iterable);
|
|
1378
1254
|
}
|
|
1379
|
-
if (typeof
|
|
1255
|
+
if (typeof iterable?.[Symbol.iterator] !== "function") {
|
|
1380
1256
|
throw new EvaluationError("value not iterable");
|
|
1381
1257
|
}
|
|
1382
1258
|
return func(iterable);
|
|
@@ -1699,7 +1575,7 @@ function applyBinaryOp(ast, context) {
|
|
|
1699
1575
|
}
|
|
1700
1576
|
return Math.floor(left / right);
|
|
1701
1577
|
case "**":
|
|
1702
|
-
return
|
|
1578
|
+
return left ** right;
|
|
1703
1579
|
case "==":
|
|
1704
1580
|
return isEqual(left, right);
|
|
1705
1581
|
case "<>":
|
|
@@ -1821,7 +1697,7 @@ function evaluate(ast, context = {}) {
|
|
|
1821
1697
|
const dicts = /* @__PURE__ */ new Set();
|
|
1822
1698
|
let pyContext;
|
|
1823
1699
|
const evalContext = Object.create(context);
|
|
1824
|
-
if (!
|
|
1700
|
+
if (!evalContext?.context) {
|
|
1825
1701
|
Object.defineProperty(evalContext, "context", {
|
|
1826
1702
|
get() {
|
|
1827
1703
|
if (!pyContext) {
|
|
@@ -1832,18 +1708,17 @@ function evaluate(ast, context = {}) {
|
|
|
1832
1708
|
});
|
|
1833
1709
|
}
|
|
1834
1710
|
function _innerEvaluate(ast2) {
|
|
1835
|
-
|
|
1836
|
-
switch (ast2 == null ? void 0 : ast2.type) {
|
|
1711
|
+
switch (ast2?.type) {
|
|
1837
1712
|
case 0:
|
|
1838
1713
|
// Number
|
|
1839
1714
|
case 1:
|
|
1840
1715
|
return ast2.value;
|
|
1841
1716
|
case 5:
|
|
1842
1717
|
if (ast2.value in evalContext) {
|
|
1843
|
-
if (typeof evalContext[ast2.value] === "object" &&
|
|
1844
|
-
return
|
|
1718
|
+
if (typeof evalContext[ast2.value] === "object" && evalContext[ast2.value]?.id) {
|
|
1719
|
+
return evalContext[ast2.value]?.id;
|
|
1845
1720
|
}
|
|
1846
|
-
return
|
|
1721
|
+
return evalContext[ast2.value] ?? false;
|
|
1847
1722
|
} else if (ast2.value in BUILTINS) {
|
|
1848
1723
|
return BUILTINS[ast2.value];
|
|
1849
1724
|
} else {
|
|
@@ -1880,7 +1755,7 @@ function evaluate(ast, context = {}) {
|
|
|
1880
1755
|
const args = ast2.args.map(_evaluate);
|
|
1881
1756
|
const kwargs = {};
|
|
1882
1757
|
for (const kwarg in ast2.kwargs) {
|
|
1883
|
-
kwargs[kwarg] = _evaluate(ast2
|
|
1758
|
+
kwargs[kwarg] = _evaluate(ast2?.kwargs[kwarg]);
|
|
1884
1759
|
}
|
|
1885
1760
|
if (fnValue === PyDate || fnValue === PyDateTime || fnValue === PyTime || fnValue === PyRelativeDelta || fnValue === PyTimeDelta) {
|
|
1886
1761
|
return fnValue.create(...args, kwargs);
|
|
@@ -1959,25 +1834,9 @@ function escapeRegExp(str) {
|
|
|
1959
1834
|
var InvalidDomainError = class extends Error {
|
|
1960
1835
|
};
|
|
1961
1836
|
var Domain = class _Domain {
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
return new _Domain(descr.toString());
|
|
1966
|
-
} else {
|
|
1967
|
-
let rawAST;
|
|
1968
|
-
try {
|
|
1969
|
-
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1970
|
-
} catch (error) {
|
|
1971
|
-
throw new InvalidDomainError(
|
|
1972
|
-
`Invalid domain representation: ${descr}`,
|
|
1973
|
-
{
|
|
1974
|
-
cause: error
|
|
1975
|
-
}
|
|
1976
|
-
);
|
|
1977
|
-
}
|
|
1978
|
-
this.ast = normalizeDomainAST(rawAST);
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1837
|
+
ast = { type: -1, value: null };
|
|
1838
|
+
static TRUE;
|
|
1839
|
+
static FALSE;
|
|
1981
1840
|
static combine(domains, operator) {
|
|
1982
1841
|
if (domains.length === 0) {
|
|
1983
1842
|
return new _Domain([]);
|
|
@@ -2056,6 +1915,24 @@ var Domain = class _Domain {
|
|
|
2056
1915
|
processLeaf(d.ast.value, 0, "&", newDomain);
|
|
2057
1916
|
return newDomain;
|
|
2058
1917
|
}
|
|
1918
|
+
constructor(descr = []) {
|
|
1919
|
+
if (descr instanceof _Domain) {
|
|
1920
|
+
return new _Domain(descr.toString());
|
|
1921
|
+
} else {
|
|
1922
|
+
let rawAST;
|
|
1923
|
+
try {
|
|
1924
|
+
rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
|
|
1925
|
+
} catch (error) {
|
|
1926
|
+
throw new InvalidDomainError(
|
|
1927
|
+
`Invalid domain representation: ${descr}`,
|
|
1928
|
+
{
|
|
1929
|
+
cause: error
|
|
1930
|
+
}
|
|
1931
|
+
);
|
|
1932
|
+
}
|
|
1933
|
+
this.ast = normalizeDomainAST(rawAST);
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
2059
1936
|
contains(record) {
|
|
2060
1937
|
const expr = evaluate(this.ast, record);
|
|
2061
1938
|
return matchDomain(record, expr);
|
|
@@ -2074,7 +1951,7 @@ var Domain = class _Domain {
|
|
|
2074
1951
|
return evaluatedAsList;
|
|
2075
1952
|
}
|
|
2076
1953
|
return this.toString();
|
|
2077
|
-
} catch
|
|
1954
|
+
} catch {
|
|
2078
1955
|
return this.toString();
|
|
2079
1956
|
}
|
|
2080
1957
|
}
|
|
@@ -2274,7 +2151,7 @@ function matchDomain(record, domain) {
|
|
|
2274
2151
|
}
|
|
2275
2152
|
|
|
2276
2153
|
// src/utils/function.ts
|
|
2277
|
-
|
|
2154
|
+
import { useEffect, useState } from "react";
|
|
2278
2155
|
var toQueryString = (params) => {
|
|
2279
2156
|
return Object.keys(params).map(
|
|
2280
2157
|
(key) => encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString())
|
|
@@ -2317,22 +2194,22 @@ var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
|
|
|
2317
2194
|
|
|
2318
2195
|
// src/utils/storage/local-storage.ts
|
|
2319
2196
|
var localStorageUtils = () => {
|
|
2320
|
-
const setToken = (access_token) =>
|
|
2197
|
+
const setToken = async (access_token) => {
|
|
2321
2198
|
localStorage.setItem("accessToken", access_token);
|
|
2322
|
-
}
|
|
2323
|
-
const setRefreshToken = (refresh_token) =>
|
|
2199
|
+
};
|
|
2200
|
+
const setRefreshToken = async (refresh_token) => {
|
|
2324
2201
|
localStorage.setItem("refreshToken", refresh_token);
|
|
2325
|
-
}
|
|
2326
|
-
const getAccessToken = () =>
|
|
2202
|
+
};
|
|
2203
|
+
const getAccessToken = async () => {
|
|
2327
2204
|
return localStorage.getItem("accessToken");
|
|
2328
|
-
}
|
|
2329
|
-
const getRefreshToken = () =>
|
|
2205
|
+
};
|
|
2206
|
+
const getRefreshToken = async () => {
|
|
2330
2207
|
return localStorage.getItem("refreshToken");
|
|
2331
|
-
}
|
|
2332
|
-
const clearToken = () =>
|
|
2208
|
+
};
|
|
2209
|
+
const clearToken = async () => {
|
|
2333
2210
|
localStorage.removeItem("accessToken");
|
|
2334
2211
|
localStorage.removeItem("refreshToken");
|
|
2335
|
-
}
|
|
2212
|
+
};
|
|
2336
2213
|
return {
|
|
2337
2214
|
setToken,
|
|
2338
2215
|
setRefreshToken,
|
|
@@ -2344,9 +2221,9 @@ var localStorageUtils = () => {
|
|
|
2344
2221
|
|
|
2345
2222
|
// src/utils/storage/session-storage.ts
|
|
2346
2223
|
var sessionStorageUtils = () => {
|
|
2347
|
-
const getBrowserSession = () =>
|
|
2224
|
+
const getBrowserSession = async () => {
|
|
2348
2225
|
return sessionStorage.getItem("browserSession");
|
|
2349
|
-
}
|
|
2226
|
+
};
|
|
2350
2227
|
return {
|
|
2351
2228
|
getBrowserSession
|
|
2352
2229
|
};
|
|
@@ -2355,14 +2232,13 @@ var sessionStorageUtils = () => {
|
|
|
2355
2232
|
// src/configs/axios-client.ts
|
|
2356
2233
|
var axiosClient = {
|
|
2357
2234
|
init(config) {
|
|
2358
|
-
|
|
2359
|
-
const
|
|
2360
|
-
const sessionStorage2 = (_b = config.sessionStorageUtils) != null ? _b : sessionStorageUtils();
|
|
2235
|
+
const localStorage2 = config.localStorageUtils ?? localStorageUtils();
|
|
2236
|
+
const sessionStorage2 = config.sessionStorageUtils ?? sessionStorageUtils();
|
|
2361
2237
|
const db = config.db;
|
|
2362
2238
|
let isRefreshing = false;
|
|
2363
2239
|
let failedQueue = [];
|
|
2364
2240
|
const processQueue = (error, token = null) => {
|
|
2365
|
-
failedQueue
|
|
2241
|
+
failedQueue?.forEach((prom) => {
|
|
2366
2242
|
if (error) {
|
|
2367
2243
|
prom.reject(error);
|
|
2368
2244
|
} else {
|
|
@@ -2371,44 +2247,39 @@ var axiosClient = {
|
|
|
2371
2247
|
});
|
|
2372
2248
|
failedQueue = [];
|
|
2373
2249
|
};
|
|
2374
|
-
const instance =
|
|
2375
|
-
adapter:
|
|
2250
|
+
const instance = axios.create({
|
|
2251
|
+
adapter: axios.defaults.adapter,
|
|
2376
2252
|
baseURL: config.baseUrl,
|
|
2377
2253
|
timeout: 5e4,
|
|
2378
2254
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2379
2255
|
});
|
|
2380
|
-
instance.interceptors.request.use(
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
if (token) {
|
|
2385
|
-
config2.headers["Authorization"] = "Bearer " + token;
|
|
2386
|
-
}
|
|
2387
|
-
return config2;
|
|
2388
|
-
}),
|
|
2389
|
-
(error) => {
|
|
2390
|
-
Promise.reject(error);
|
|
2256
|
+
instance.interceptors.request.use(async (config2) => {
|
|
2257
|
+
const { useRefreshToken, useActionToken, actionToken } = config2;
|
|
2258
|
+
if (useActionToken && actionToken) {
|
|
2259
|
+
config2.headers["Action-Token"] = actionToken;
|
|
2391
2260
|
}
|
|
2392
|
-
|
|
2261
|
+
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
2262
|
+
const token = await getToken?.();
|
|
2263
|
+
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
|
2264
|
+
return config2;
|
|
2265
|
+
}, Promise.reject);
|
|
2393
2266
|
instance.interceptors.response.use(
|
|
2394
2267
|
(response) => {
|
|
2395
2268
|
return handleResponse(response);
|
|
2396
2269
|
},
|
|
2397
|
-
(error) =>
|
|
2398
|
-
|
|
2399
|
-
const handleError3 = (error2) => __async(null, null, function* () {
|
|
2400
|
-
var _a3;
|
|
2270
|
+
async (error) => {
|
|
2271
|
+
const handleError3 = async (error2) => {
|
|
2401
2272
|
if (!error2.response) {
|
|
2402
2273
|
return error2;
|
|
2403
2274
|
}
|
|
2404
2275
|
const { data } = error2.response;
|
|
2405
|
-
if (data && data.code === 400 && ["invalid_grant"].includes(
|
|
2406
|
-
|
|
2276
|
+
if (data && data.code === 400 && ["invalid_grant"].includes(data.data?.error)) {
|
|
2277
|
+
await clearAuthToken();
|
|
2407
2278
|
}
|
|
2408
2279
|
return data;
|
|
2409
|
-
}
|
|
2280
|
+
};
|
|
2410
2281
|
const originalRequest = error.config;
|
|
2411
|
-
if ((
|
|
2282
|
+
if ((error.response?.status === 403 || error.response?.status === 401 || error.response?.status === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401, "ERR_2FA_006"].includes(
|
|
2412
2283
|
error.response.data.code
|
|
2413
2284
|
)) {
|
|
2414
2285
|
if (isRefreshing) {
|
|
@@ -2421,19 +2292,18 @@ var axiosClient = {
|
|
|
2421
2292
|
token
|
|
2422
2293
|
);
|
|
2423
2294
|
return instance.request(originalRequest);
|
|
2424
|
-
}).catch((err) =>
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
yield clearAuthToken();
|
|
2295
|
+
}).catch(async (err) => {
|
|
2296
|
+
if ((err.response?.status === 400 || err.response?.status === 401) && ["invalid_grant"].includes(err.response.data.error)) {
|
|
2297
|
+
await clearAuthToken();
|
|
2428
2298
|
}
|
|
2429
|
-
})
|
|
2299
|
+
});
|
|
2430
2300
|
}
|
|
2431
|
-
const browserSession =
|
|
2432
|
-
const refreshToken =
|
|
2433
|
-
const accessTokenExp =
|
|
2301
|
+
const browserSession = await sessionStorage2.getBrowserSession();
|
|
2302
|
+
const refreshToken = await localStorage2.getRefreshToken();
|
|
2303
|
+
const accessTokenExp = await localStorage2.getAccessToken();
|
|
2434
2304
|
isRefreshing = true;
|
|
2435
2305
|
if (!refreshToken && (!browserSession || browserSession == "unActive")) {
|
|
2436
|
-
|
|
2306
|
+
await clearAuthToken();
|
|
2437
2307
|
} else {
|
|
2438
2308
|
const payload = Object.fromEntries(
|
|
2439
2309
|
Object.entries({
|
|
@@ -2444,9 +2314,8 @@ var axiosClient = {
|
|
|
2444
2314
|
}).filter(([_, value]) => !!value)
|
|
2445
2315
|
);
|
|
2446
2316
|
return new Promise(function(resolve) {
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
`${config.baseUrl}${(_a3 = config.refreshTokenEndpoint) != null ? _a3 : "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
2317
|
+
axios.post(
|
|
2318
|
+
`${config.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
2450
2319
|
payload,
|
|
2451
2320
|
{
|
|
2452
2321
|
headers: {
|
|
@@ -2454,11 +2323,11 @@ var axiosClient = {
|
|
|
2454
2323
|
Authorization: `Bearer ${accessTokenExp}`
|
|
2455
2324
|
}
|
|
2456
2325
|
}
|
|
2457
|
-
).then((res) =>
|
|
2326
|
+
).then(async (res) => {
|
|
2458
2327
|
const data = res.data;
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2328
|
+
await localStorage2.setToken(data.access_token);
|
|
2329
|
+
await localStorage2.setRefreshToken(data.refresh_token);
|
|
2330
|
+
axios.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
|
|
2462
2331
|
originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
|
|
2463
2332
|
originalRequest.data = updateTokenParamInOriginalRequest(
|
|
2464
2333
|
originalRequest,
|
|
@@ -2466,26 +2335,25 @@ var axiosClient = {
|
|
|
2466
2335
|
);
|
|
2467
2336
|
processQueue(null, data.access_token);
|
|
2468
2337
|
resolve(instance.request(originalRequest));
|
|
2469
|
-
})
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
yield clearAuthToken();
|
|
2338
|
+
}).catch(async (err) => {
|
|
2339
|
+
if (err && (err?.error_code === "AUTHEN_FAIL" || err?.error_code === "TOKEN_EXPIRED" || err?.error_code === "TOKEN_INCORRECT" || err?.code === "ERR_BAD_REQUEST") || err?.error_code === "ERR_2FA_006") {
|
|
2340
|
+
await clearAuthToken();
|
|
2473
2341
|
}
|
|
2474
2342
|
if (err && err.response) {
|
|
2475
|
-
const { error_code } =
|
|
2343
|
+
const { error_code } = err.response?.data || {};
|
|
2476
2344
|
if (error_code === "AUTHEN_FAIL") {
|
|
2477
|
-
|
|
2345
|
+
await clearAuthToken();
|
|
2478
2346
|
}
|
|
2479
2347
|
}
|
|
2480
2348
|
processQueue(err, null);
|
|
2481
|
-
})
|
|
2349
|
+
}).finally(() => {
|
|
2482
2350
|
isRefreshing = false;
|
|
2483
2351
|
});
|
|
2484
2352
|
});
|
|
2485
2353
|
}
|
|
2486
2354
|
}
|
|
2487
|
-
return Promise.reject(
|
|
2488
|
-
}
|
|
2355
|
+
return Promise.reject(await handleError3(error));
|
|
2356
|
+
}
|
|
2489
2357
|
);
|
|
2490
2358
|
const handleResponse = (res) => {
|
|
2491
2359
|
if (res && res.data) {
|
|
@@ -2494,7 +2362,6 @@ var axiosClient = {
|
|
|
2494
2362
|
return res;
|
|
2495
2363
|
};
|
|
2496
2364
|
const handleError2 = (error) => {
|
|
2497
|
-
var _a2, _b2, _c;
|
|
2498
2365
|
if (error.isAxiosError && error.code === "ECONNABORTED") {
|
|
2499
2366
|
console.error("Request Timeout Error:", error);
|
|
2500
2367
|
return "Request Timeout Error";
|
|
@@ -2502,17 +2369,17 @@ var axiosClient = {
|
|
|
2502
2369
|
console.error("Network Error:", error);
|
|
2503
2370
|
return "Network Error";
|
|
2504
2371
|
} else {
|
|
2505
|
-
console.error("Other Error:", error
|
|
2506
|
-
const errorMessage =
|
|
2507
|
-
return { message: errorMessage, status:
|
|
2372
|
+
console.error("Other Error:", error?.response);
|
|
2373
|
+
const errorMessage = error?.response?.data?.message || "An error occurred";
|
|
2374
|
+
return { message: errorMessage, status: error?.response?.status };
|
|
2508
2375
|
}
|
|
2509
2376
|
};
|
|
2510
|
-
const clearAuthToken = () =>
|
|
2511
|
-
|
|
2377
|
+
const clearAuthToken = async () => {
|
|
2378
|
+
await localStorage2.clearToken();
|
|
2512
2379
|
if (typeof window !== "undefined") {
|
|
2513
2380
|
window.location.href = `/login`;
|
|
2514
2381
|
}
|
|
2515
|
-
}
|
|
2382
|
+
};
|
|
2516
2383
|
function formatUrl(url, db2) {
|
|
2517
2384
|
return url + (db2 ? "?db=" + db2 : "");
|
|
2518
2385
|
}
|
|
@@ -2536,14 +2403,14 @@ var axiosClient = {
|
|
|
2536
2403
|
};
|
|
2537
2404
|
|
|
2538
2405
|
// src/store/index.ts
|
|
2539
|
-
|
|
2406
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
2540
2407
|
|
|
2541
2408
|
// src/store/reducers/breadcrums-slice/index.ts
|
|
2542
|
-
|
|
2409
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2543
2410
|
var initialState = {
|
|
2544
2411
|
breadCrumbs: []
|
|
2545
2412
|
};
|
|
2546
|
-
var breadcrumbsSlice =
|
|
2413
|
+
var breadcrumbsSlice = createSlice({
|
|
2547
2414
|
name: "breadcrumbs",
|
|
2548
2415
|
initialState,
|
|
2549
2416
|
reducers: {
|
|
@@ -2556,12 +2423,14 @@ var { setBreadCrumbs } = breadcrumbsSlice.actions;
|
|
|
2556
2423
|
var breadcrums_slice_default = breadcrumbsSlice.reducer;
|
|
2557
2424
|
|
|
2558
2425
|
// src/store/reducers/env-slice/index.ts
|
|
2559
|
-
|
|
2426
|
+
import { createSlice as createSlice2 } from "@reduxjs/toolkit";
|
|
2560
2427
|
var initialState2 = {
|
|
2561
2428
|
baseUrl: "",
|
|
2562
2429
|
requests: null,
|
|
2563
2430
|
companies: [],
|
|
2564
2431
|
user: {},
|
|
2432
|
+
db: "",
|
|
2433
|
+
refreshTokenEndpoint: "",
|
|
2565
2434
|
config: null,
|
|
2566
2435
|
envFile: null,
|
|
2567
2436
|
defaultCompany: {
|
|
@@ -2577,7 +2446,7 @@ var initialState2 = {
|
|
|
2577
2446
|
tz: "Asia/Saigon"
|
|
2578
2447
|
}
|
|
2579
2448
|
};
|
|
2580
|
-
var envSlice = (
|
|
2449
|
+
var envSlice = createSlice2({
|
|
2581
2450
|
name: "env",
|
|
2582
2451
|
initialState: initialState2,
|
|
2583
2452
|
reducers: {
|
|
@@ -2624,7 +2493,7 @@ var {
|
|
|
2624
2493
|
var env_slice_default = envSlice.reducer;
|
|
2625
2494
|
|
|
2626
2495
|
// src/store/reducers/excel-slice/index.ts
|
|
2627
|
-
|
|
2496
|
+
import { createSlice as createSlice3 } from "@reduxjs/toolkit";
|
|
2628
2497
|
var initialState3 = {
|
|
2629
2498
|
dataParse: null,
|
|
2630
2499
|
idFile: null,
|
|
@@ -2633,7 +2502,7 @@ var initialState3 = {
|
|
|
2633
2502
|
selectedFile: null,
|
|
2634
2503
|
errorData: null
|
|
2635
2504
|
};
|
|
2636
|
-
var excelSlice = (
|
|
2505
|
+
var excelSlice = createSlice3({
|
|
2637
2506
|
name: "excel",
|
|
2638
2507
|
initialState: initialState3,
|
|
2639
2508
|
reducers: {
|
|
@@ -2668,7 +2537,7 @@ var {
|
|
|
2668
2537
|
var excel_slice_default = excelSlice.reducer;
|
|
2669
2538
|
|
|
2670
2539
|
// src/store/reducers/form-slice/index.ts
|
|
2671
|
-
|
|
2540
|
+
import { createSlice as createSlice4 } from "@reduxjs/toolkit";
|
|
2672
2541
|
var initialState4 = {
|
|
2673
2542
|
viewDataStore: {},
|
|
2674
2543
|
isShowingModalDetail: false,
|
|
@@ -2678,7 +2547,7 @@ var initialState4 = {
|
|
|
2678
2547
|
listSubject: {},
|
|
2679
2548
|
dataUser: {}
|
|
2680
2549
|
};
|
|
2681
|
-
var formSlice = (
|
|
2550
|
+
var formSlice = createSlice4({
|
|
2682
2551
|
name: "form",
|
|
2683
2552
|
initialState: initialState4,
|
|
2684
2553
|
reducers: {
|
|
@@ -2717,15 +2586,15 @@ var {
|
|
|
2717
2586
|
var form_slice_default = formSlice.reducer;
|
|
2718
2587
|
|
|
2719
2588
|
// src/store/reducers/header-slice/index.ts
|
|
2720
|
-
|
|
2721
|
-
var headerSlice = (
|
|
2589
|
+
import { createSlice as createSlice5 } from "@reduxjs/toolkit";
|
|
2590
|
+
var headerSlice = createSlice5({
|
|
2722
2591
|
name: "header",
|
|
2723
2592
|
initialState: {
|
|
2724
2593
|
value: { allowedCompanyIds: [] }
|
|
2725
2594
|
},
|
|
2726
2595
|
reducers: {
|
|
2727
2596
|
setHeader: (state, action) => {
|
|
2728
|
-
state.value =
|
|
2597
|
+
state.value = { ...state.value, ...action.payload };
|
|
2729
2598
|
},
|
|
2730
2599
|
setAllowedCompanyIds: (state, action) => {
|
|
2731
2600
|
state.value.allowedCompanyIds = action.payload;
|
|
@@ -2736,7 +2605,7 @@ var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
|
|
|
2736
2605
|
var header_slice_default = headerSlice.reducer;
|
|
2737
2606
|
|
|
2738
2607
|
// src/store/reducers/list-slice/index.ts
|
|
2739
|
-
|
|
2608
|
+
import { createSlice as createSlice6 } from "@reduxjs/toolkit";
|
|
2740
2609
|
var initialState5 = {
|
|
2741
2610
|
pageLimit: 10,
|
|
2742
2611
|
fields: {},
|
|
@@ -2750,7 +2619,7 @@ var initialState5 = {
|
|
|
2750
2619
|
page: 0,
|
|
2751
2620
|
domainTable: []
|
|
2752
2621
|
};
|
|
2753
|
-
var listSlice = (
|
|
2622
|
+
var listSlice = createSlice6({
|
|
2754
2623
|
name: "list",
|
|
2755
2624
|
initialState: initialState5,
|
|
2756
2625
|
reducers: {
|
|
@@ -2801,13 +2670,13 @@ var {
|
|
|
2801
2670
|
var list_slice_default = listSlice.reducer;
|
|
2802
2671
|
|
|
2803
2672
|
// src/store/reducers/login-slice/index.ts
|
|
2804
|
-
|
|
2673
|
+
import { createSlice as createSlice7 } from "@reduxjs/toolkit";
|
|
2805
2674
|
var initialState6 = {
|
|
2806
2675
|
db: "",
|
|
2807
2676
|
redirectTo: "/",
|
|
2808
2677
|
forgotPasswordUrl: "/"
|
|
2809
2678
|
};
|
|
2810
|
-
var loginSlice = (
|
|
2679
|
+
var loginSlice = createSlice7({
|
|
2811
2680
|
name: "login",
|
|
2812
2681
|
initialState: initialState6,
|
|
2813
2682
|
reducers: {
|
|
@@ -2826,14 +2695,14 @@ var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
|
|
|
2826
2695
|
var login_slice_default = loginSlice.reducer;
|
|
2827
2696
|
|
|
2828
2697
|
// src/store/reducers/navbar-slice/index.ts
|
|
2829
|
-
|
|
2698
|
+
import { createSlice as createSlice8 } from "@reduxjs/toolkit";
|
|
2830
2699
|
var initialState7 = {
|
|
2831
2700
|
menuFocus: {},
|
|
2832
2701
|
menuAction: {},
|
|
2833
2702
|
navbarWidth: 250,
|
|
2834
2703
|
menuList: []
|
|
2835
2704
|
};
|
|
2836
|
-
var navbarSlice = (
|
|
2705
|
+
var navbarSlice = createSlice8({
|
|
2837
2706
|
name: "navbar",
|
|
2838
2707
|
initialState: initialState7,
|
|
2839
2708
|
reducers: {
|
|
@@ -2855,11 +2724,11 @@ var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSl
|
|
|
2855
2724
|
var navbar_slice_default = navbarSlice.reducer;
|
|
2856
2725
|
|
|
2857
2726
|
// src/store/reducers/profile-slice/index.ts
|
|
2858
|
-
|
|
2727
|
+
import { createSlice as createSlice9 } from "@reduxjs/toolkit";
|
|
2859
2728
|
var initialState8 = {
|
|
2860
2729
|
profile: {}
|
|
2861
2730
|
};
|
|
2862
|
-
var profileSlice = (
|
|
2731
|
+
var profileSlice = createSlice9({
|
|
2863
2732
|
name: "profile",
|
|
2864
2733
|
initialState: initialState8,
|
|
2865
2734
|
reducers: {
|
|
@@ -2872,7 +2741,7 @@ var { setProfile } = profileSlice.actions;
|
|
|
2872
2741
|
var profile_slice_default = profileSlice.reducer;
|
|
2873
2742
|
|
|
2874
2743
|
// src/store/reducers/search-slice/index.ts
|
|
2875
|
-
|
|
2744
|
+
import { createSlice as createSlice10 } from "@reduxjs/toolkit";
|
|
2876
2745
|
var initialState9 = {
|
|
2877
2746
|
groupByDomain: null,
|
|
2878
2747
|
searchBy: [],
|
|
@@ -2884,7 +2753,7 @@ var initialState9 = {
|
|
|
2884
2753
|
filterBy: [],
|
|
2885
2754
|
groupBy: []
|
|
2886
2755
|
};
|
|
2887
|
-
var searchSlice = (
|
|
2756
|
+
var searchSlice = createSlice10({
|
|
2888
2757
|
name: "search",
|
|
2889
2758
|
initialState: initialState9,
|
|
2890
2759
|
reducers: {
|
|
@@ -2958,7 +2827,7 @@ var {
|
|
|
2958
2827
|
var search_slice_default = searchSlice.reducer;
|
|
2959
2828
|
|
|
2960
2829
|
// src/store/store.ts
|
|
2961
|
-
|
|
2830
|
+
import { configureStore } from "@reduxjs/toolkit";
|
|
2962
2831
|
|
|
2963
2832
|
// node_modules/redux/dist/redux.mjs
|
|
2964
2833
|
function formatProdErrorMessage(code) {
|
|
@@ -3142,7 +3011,7 @@ var rootReducer = combineReducers({
|
|
|
3142
3011
|
excel: excel_slice_default,
|
|
3143
3012
|
profile: profile_slice_default
|
|
3144
3013
|
});
|
|
3145
|
-
var envStore =
|
|
3014
|
+
var envStore = configureStore({
|
|
3146
3015
|
reducer: rootReducer,
|
|
3147
3016
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
3148
3017
|
serializableCheck: false
|
|
@@ -3151,130 +3020,114 @@ var envStore = (0, import_toolkit11.configureStore)({
|
|
|
3151
3020
|
|
|
3152
3021
|
// src/environment/EnvStore.ts
|
|
3153
3022
|
var EnvStore = class {
|
|
3154
|
-
|
|
3155
|
-
|
|
3023
|
+
baseUrl;
|
|
3024
|
+
requests;
|
|
3025
|
+
context;
|
|
3026
|
+
defaultCompany;
|
|
3027
|
+
config;
|
|
3028
|
+
companies;
|
|
3029
|
+
user;
|
|
3030
|
+
db;
|
|
3031
|
+
localStorageUtils;
|
|
3032
|
+
sessionStorageUtils;
|
|
3033
|
+
refreshTokenEndpoint;
|
|
3034
|
+
constructor(localStorageUtils2, sessionStorageUtils2) {
|
|
3156
3035
|
this.localStorageUtils = localStorageUtils2;
|
|
3157
3036
|
this.sessionStorageUtils = sessionStorageUtils2;
|
|
3158
3037
|
this.setup();
|
|
3159
3038
|
}
|
|
3160
3039
|
setup() {
|
|
3161
|
-
const env2 =
|
|
3162
|
-
this.baseUrl = env2
|
|
3163
|
-
this.requests = env2
|
|
3164
|
-
this.context = env2
|
|
3165
|
-
this.defaultCompany = env2
|
|
3166
|
-
this.config = env2
|
|
3167
|
-
this.companies =
|
|
3168
|
-
this.user = env2
|
|
3169
|
-
this.db = env2
|
|
3170
|
-
this.refreshTokenEndpoint = env2
|
|
3040
|
+
const env2 = envStore.getState().env;
|
|
3041
|
+
this.baseUrl = env2?.baseUrl;
|
|
3042
|
+
this.requests = env2?.requests;
|
|
3043
|
+
this.context = env2?.context;
|
|
3044
|
+
this.defaultCompany = env2?.defaultCompany;
|
|
3045
|
+
this.config = env2?.config;
|
|
3046
|
+
this.companies = env2?.companies || [];
|
|
3047
|
+
this.user = env2?.user;
|
|
3048
|
+
this.db = env2?.db;
|
|
3049
|
+
this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
|
|
3171
3050
|
}
|
|
3172
3051
|
setupEnv(envConfig) {
|
|
3173
|
-
const dispatch =
|
|
3174
|
-
const env2 =
|
|
3052
|
+
const dispatch = envStore.dispatch;
|
|
3053
|
+
const env2 = {
|
|
3054
|
+
...envConfig,
|
|
3175
3055
|
localStorageUtils: this.localStorageUtils,
|
|
3176
3056
|
sessionStorageUtils: this.sessionStorageUtils
|
|
3177
|
-
}
|
|
3057
|
+
};
|
|
3178
3058
|
const requests = axiosClient.init(env2);
|
|
3179
|
-
dispatch(setEnv(
|
|
3059
|
+
dispatch(setEnv({ ...env2, requests }));
|
|
3180
3060
|
this.setup();
|
|
3181
3061
|
}
|
|
3182
3062
|
setUid(uid) {
|
|
3183
|
-
const dispatch =
|
|
3063
|
+
const dispatch = envStore.dispatch;
|
|
3184
3064
|
dispatch(setUid(uid));
|
|
3185
3065
|
this.setup();
|
|
3186
3066
|
}
|
|
3187
3067
|
setLang(lang) {
|
|
3188
|
-
const dispatch =
|
|
3068
|
+
const dispatch = envStore.dispatch;
|
|
3189
3069
|
dispatch(setLang(lang));
|
|
3190
3070
|
this.setup();
|
|
3191
3071
|
}
|
|
3192
3072
|
setAllowCompanies(allowCompanies) {
|
|
3193
|
-
const dispatch =
|
|
3073
|
+
const dispatch = envStore.dispatch;
|
|
3194
3074
|
dispatch(setAllowCompanies(allowCompanies));
|
|
3195
3075
|
this.setup();
|
|
3196
3076
|
}
|
|
3197
3077
|
setCompanies(companies) {
|
|
3198
|
-
const dispatch =
|
|
3078
|
+
const dispatch = envStore.dispatch;
|
|
3199
3079
|
dispatch(setCompanies(companies));
|
|
3200
3080
|
this.setup();
|
|
3201
3081
|
}
|
|
3202
3082
|
setDefaultCompany(company) {
|
|
3203
|
-
const dispatch =
|
|
3083
|
+
const dispatch = envStore.dispatch;
|
|
3204
3084
|
dispatch(setDefaultCompany(company));
|
|
3205
3085
|
this.setup();
|
|
3206
3086
|
}
|
|
3207
3087
|
setUserInfo(userInfo) {
|
|
3208
|
-
const dispatch =
|
|
3088
|
+
const dispatch = envStore.dispatch;
|
|
3209
3089
|
dispatch(setUser(userInfo));
|
|
3210
3090
|
this.setup();
|
|
3211
3091
|
}
|
|
3212
3092
|
};
|
|
3213
3093
|
var env = null;
|
|
3214
3094
|
function getEnv() {
|
|
3215
|
-
if (!env)
|
|
3216
|
-
env = new EnvStore(envStore, localStorageUtils(), sessionStorageUtils());
|
|
3095
|
+
if (!env) env = new EnvStore(localStorageUtils(), sessionStorageUtils());
|
|
3217
3096
|
return env;
|
|
3218
3097
|
}
|
|
3219
3098
|
|
|
3220
3099
|
// src/services/action-service/index.ts
|
|
3221
3100
|
var ActionService = {
|
|
3222
3101
|
// Load Action
|
|
3223
|
-
loadAction(
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
});
|
|
3238
|
-
});
|
|
3239
|
-
},
|
|
3240
|
-
// Call Button
|
|
3241
|
-
callButton(_0) {
|
|
3242
|
-
return __async(this, arguments, function* ({
|
|
3243
|
-
model,
|
|
3244
|
-
ids = [],
|
|
3245
|
-
context,
|
|
3246
|
-
method
|
|
3247
|
-
}) {
|
|
3248
|
-
try {
|
|
3249
|
-
const env2 = getEnv();
|
|
3250
|
-
const jsonData = {
|
|
3251
|
-
model,
|
|
3252
|
-
method,
|
|
3253
|
-
ids,
|
|
3254
|
-
with_context: context
|
|
3255
|
-
};
|
|
3256
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3257
|
-
headers: {
|
|
3258
|
-
"Content-Type": "application/json"
|
|
3259
|
-
}
|
|
3260
|
-
});
|
|
3261
|
-
} catch (error) {
|
|
3262
|
-
console.error("Error when calling button action:", error);
|
|
3263
|
-
throw error;
|
|
3102
|
+
async loadAction({
|
|
3103
|
+
idAction,
|
|
3104
|
+
context
|
|
3105
|
+
}) {
|
|
3106
|
+
const env2 = getEnv();
|
|
3107
|
+
const jsonData = {
|
|
3108
|
+
action_id: idAction,
|
|
3109
|
+
with_context: {
|
|
3110
|
+
...context
|
|
3111
|
+
}
|
|
3112
|
+
};
|
|
3113
|
+
return env2.requests.post(`${"/load_action" /* LOAD_ACTION */}`, jsonData, {
|
|
3114
|
+
headers: {
|
|
3115
|
+
"Content-Type": "application/json"
|
|
3264
3116
|
}
|
|
3265
3117
|
});
|
|
3266
3118
|
},
|
|
3267
|
-
//
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3119
|
+
// Call Button
|
|
3120
|
+
async callButton({
|
|
3121
|
+
model,
|
|
3122
|
+
ids = [],
|
|
3123
|
+
context,
|
|
3124
|
+
method
|
|
3125
|
+
}) {
|
|
3126
|
+
try {
|
|
3274
3127
|
const env2 = getEnv();
|
|
3275
3128
|
const jsonData = {
|
|
3276
3129
|
model,
|
|
3277
|
-
method
|
|
3130
|
+
method,
|
|
3278
3131
|
ids,
|
|
3279
3132
|
with_context: context
|
|
3280
3133
|
};
|
|
@@ -3283,96 +3136,112 @@ var ActionService = {
|
|
|
3283
3136
|
"Content-Type": "application/json"
|
|
3284
3137
|
}
|
|
3285
3138
|
});
|
|
3139
|
+
} catch (error) {
|
|
3140
|
+
console.error("Error when calling button action:", error);
|
|
3141
|
+
throw error;
|
|
3142
|
+
}
|
|
3143
|
+
},
|
|
3144
|
+
// remove Row
|
|
3145
|
+
async removeRows({
|
|
3146
|
+
model,
|
|
3147
|
+
ids,
|
|
3148
|
+
context
|
|
3149
|
+
}) {
|
|
3150
|
+
const env2 = getEnv();
|
|
3151
|
+
const jsonData = {
|
|
3152
|
+
model,
|
|
3153
|
+
method: "unlink",
|
|
3154
|
+
ids,
|
|
3155
|
+
with_context: context
|
|
3156
|
+
};
|
|
3157
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3158
|
+
headers: {
|
|
3159
|
+
"Content-Type": "application/json"
|
|
3160
|
+
}
|
|
3286
3161
|
});
|
|
3287
3162
|
},
|
|
3288
3163
|
// Duplicate Model
|
|
3289
|
-
duplicateRecord(
|
|
3290
|
-
|
|
3164
|
+
async duplicateRecord({
|
|
3165
|
+
model,
|
|
3166
|
+
id,
|
|
3167
|
+
context
|
|
3168
|
+
}) {
|
|
3169
|
+
const env2 = getEnv();
|
|
3170
|
+
const jsonData = {
|
|
3291
3171
|
model,
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
with_context: context
|
|
3301
|
-
};
|
|
3302
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3303
|
-
headers: {
|
|
3304
|
-
"Content-Type": "application/json"
|
|
3305
|
-
}
|
|
3306
|
-
});
|
|
3172
|
+
method: "copy",
|
|
3173
|
+
ids: id,
|
|
3174
|
+
with_context: context
|
|
3175
|
+
};
|
|
3176
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3177
|
+
headers: {
|
|
3178
|
+
"Content-Type": "application/json"
|
|
3179
|
+
}
|
|
3307
3180
|
});
|
|
3308
3181
|
},
|
|
3309
3182
|
// Get Print Report
|
|
3310
|
-
getPrintReportName(
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
report_name: {}
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
|
-
};
|
|
3323
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3324
|
-
headers: {
|
|
3325
|
-
"Content-Type": "application/json"
|
|
3183
|
+
async getPrintReportName({ id }) {
|
|
3184
|
+
const env2 = getEnv();
|
|
3185
|
+
const jsonData = {
|
|
3186
|
+
model: "ir.actions.report",
|
|
3187
|
+
method: "web_read",
|
|
3188
|
+
id,
|
|
3189
|
+
kwargs: {
|
|
3190
|
+
specification: {
|
|
3191
|
+
report_name: {}
|
|
3326
3192
|
}
|
|
3327
|
-
}
|
|
3193
|
+
}
|
|
3194
|
+
};
|
|
3195
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3196
|
+
headers: {
|
|
3197
|
+
"Content-Type": "application/json"
|
|
3198
|
+
}
|
|
3328
3199
|
});
|
|
3329
3200
|
},
|
|
3330
3201
|
//Save Print Invoice
|
|
3331
|
-
print(
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
responseType: "arraybuffer"
|
|
3348
|
-
});
|
|
3202
|
+
async print({ id, report, db }) {
|
|
3203
|
+
const env2 = getEnv();
|
|
3204
|
+
const jsonData = {
|
|
3205
|
+
report,
|
|
3206
|
+
id,
|
|
3207
|
+
type: "pdf",
|
|
3208
|
+
file_response: true,
|
|
3209
|
+
db
|
|
3210
|
+
};
|
|
3211
|
+
const queryString = toQueryString(jsonData);
|
|
3212
|
+
const urlWithParams = `${"/report" /* REPORT_PATH */}?${queryString}`;
|
|
3213
|
+
return env2.requests.get(urlWithParams, {
|
|
3214
|
+
headers: {
|
|
3215
|
+
"Content-Type": "application/json"
|
|
3216
|
+
},
|
|
3217
|
+
responseType: "arraybuffer"
|
|
3349
3218
|
});
|
|
3350
3219
|
},
|
|
3351
3220
|
//Run Action
|
|
3352
|
-
runAction(
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
}
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
}
|
|
3221
|
+
async runAction({
|
|
3222
|
+
idAction,
|
|
3223
|
+
context
|
|
3224
|
+
}) {
|
|
3225
|
+
const env2 = getEnv();
|
|
3226
|
+
const jsonData = {
|
|
3227
|
+
action_id: idAction,
|
|
3228
|
+
with_context: {
|
|
3229
|
+
...context
|
|
3230
|
+
}
|
|
3231
|
+
// context: {
|
|
3232
|
+
// lang: 'en_US',
|
|
3233
|
+
// tz: 'Asia/Saigon',
|
|
3234
|
+
// uid: 2,
|
|
3235
|
+
// allowed_company_ids: [1],
|
|
3236
|
+
// active_id: Array.isArray(idDetail) ? idDetail[0] : idDetail,
|
|
3237
|
+
// active_ids: Array.isArray(idDetail) ? [...idDetail] : idDetail,
|
|
3238
|
+
// active_model: model,
|
|
3239
|
+
// },
|
|
3240
|
+
};
|
|
3241
|
+
return env2.requests.post(`${"/run_action" /* RUN_ACTION_PATH */}`, jsonData, {
|
|
3242
|
+
headers: {
|
|
3243
|
+
"Content-Type": "application/json"
|
|
3244
|
+
}
|
|
3376
3245
|
});
|
|
3377
3246
|
}
|
|
3378
3247
|
};
|
|
@@ -3380,238 +3249,214 @@ var action_service_default = ActionService;
|
|
|
3380
3249
|
|
|
3381
3250
|
// src/services/auth-service/index.ts
|
|
3382
3251
|
var AuthService = {
|
|
3383
|
-
login(body) {
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3400
|
-
}
|
|
3401
|
-
});
|
|
3402
|
-
});
|
|
3403
|
-
},
|
|
3404
|
-
forgotPassword(email) {
|
|
3405
|
-
return __async(this, null, function* () {
|
|
3406
|
-
var _a;
|
|
3407
|
-
const env2 = getEnv();
|
|
3408
|
-
const bodyData = {
|
|
3409
|
-
login: email,
|
|
3410
|
-
url: `${window.location.origin}/reset-password`
|
|
3411
|
-
};
|
|
3412
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
3413
|
-
headers: {
|
|
3414
|
-
"Content-Type": "application/json"
|
|
3415
|
-
}
|
|
3416
|
-
});
|
|
3252
|
+
async login(body) {
|
|
3253
|
+
const env2 = getEnv();
|
|
3254
|
+
const payload = Object.fromEntries(
|
|
3255
|
+
Object.entries({
|
|
3256
|
+
username: body.email,
|
|
3257
|
+
password: body.password,
|
|
3258
|
+
grant_type: env2?.config?.grantType || "",
|
|
3259
|
+
client_id: env2?.config?.clientId || "",
|
|
3260
|
+
client_secret: env2?.config?.clientSecret || ""
|
|
3261
|
+
}).filter(([_, value]) => !!value)
|
|
3262
|
+
);
|
|
3263
|
+
const encodedData = new URLSearchParams(payload).toString();
|
|
3264
|
+
return env2?.requests?.post(body.path, encodedData, {
|
|
3265
|
+
headers: {
|
|
3266
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3267
|
+
}
|
|
3417
3268
|
});
|
|
3418
3269
|
},
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
}
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
kwargs: {
|
|
3430
|
-
vals: {
|
|
3431
|
-
email
|
|
3432
|
-
}
|
|
3433
|
-
},
|
|
3434
|
-
with_context
|
|
3435
|
-
};
|
|
3436
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, body, {
|
|
3437
|
-
headers: {
|
|
3438
|
-
"Content-Type": "application/json"
|
|
3439
|
-
}
|
|
3440
|
-
});
|
|
3270
|
+
async forgotPassword(email) {
|
|
3271
|
+
const env2 = getEnv();
|
|
3272
|
+
const bodyData = {
|
|
3273
|
+
login: email,
|
|
3274
|
+
url: `${window.location.origin}/reset-password`
|
|
3275
|
+
};
|
|
3276
|
+
return env2?.requests?.post("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
3277
|
+
headers: {
|
|
3278
|
+
"Content-Type": "application/json"
|
|
3279
|
+
}
|
|
3441
3280
|
});
|
|
3442
3281
|
},
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
"Content-Type": "application/json"
|
|
3282
|
+
async forgotPasswordSSO({
|
|
3283
|
+
email,
|
|
3284
|
+
with_context,
|
|
3285
|
+
method
|
|
3286
|
+
}) {
|
|
3287
|
+
const env2 = getEnv();
|
|
3288
|
+
const body = {
|
|
3289
|
+
method,
|
|
3290
|
+
kwargs: {
|
|
3291
|
+
vals: {
|
|
3292
|
+
email
|
|
3455
3293
|
}
|
|
3456
|
-
}
|
|
3294
|
+
},
|
|
3295
|
+
with_context
|
|
3296
|
+
};
|
|
3297
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
3298
|
+
headers: {
|
|
3299
|
+
"Content-Type": "application/json"
|
|
3300
|
+
}
|
|
3457
3301
|
});
|
|
3458
3302
|
},
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
vals: {
|
|
3471
|
-
password
|
|
3472
|
-
}
|
|
3473
|
-
},
|
|
3474
|
-
with_context
|
|
3475
|
-
};
|
|
3476
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, bodyData, {
|
|
3477
|
-
headers: {
|
|
3478
|
-
"Content-Type": "application/json"
|
|
3479
|
-
}
|
|
3480
|
-
});
|
|
3303
|
+
async resetPassword(data, token) {
|
|
3304
|
+
const env2 = getEnv();
|
|
3305
|
+
const bodyData = {
|
|
3306
|
+
token,
|
|
3307
|
+
password: data.password,
|
|
3308
|
+
new_password: data.confirmPassword
|
|
3309
|
+
};
|
|
3310
|
+
return env2?.requests?.post("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
3311
|
+
headers: {
|
|
3312
|
+
"Content-Type": "application/json"
|
|
3313
|
+
}
|
|
3481
3314
|
});
|
|
3482
3315
|
},
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
"Content-Type": "application/json"
|
|
3316
|
+
async resetPasswordSSO({
|
|
3317
|
+
method,
|
|
3318
|
+
password,
|
|
3319
|
+
with_context
|
|
3320
|
+
}) {
|
|
3321
|
+
const env2 = getEnv();
|
|
3322
|
+
const bodyData = {
|
|
3323
|
+
method,
|
|
3324
|
+
kwargs: {
|
|
3325
|
+
vals: {
|
|
3326
|
+
password
|
|
3495
3327
|
}
|
|
3496
|
-
}
|
|
3328
|
+
},
|
|
3329
|
+
with_context
|
|
3330
|
+
};
|
|
3331
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, bodyData, {
|
|
3332
|
+
headers: {
|
|
3333
|
+
"Content-Type": "application/json"
|
|
3334
|
+
}
|
|
3497
3335
|
});
|
|
3498
3336
|
},
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
});
|
|
3337
|
+
async updatePassword(data, token) {
|
|
3338
|
+
const env2 = getEnv();
|
|
3339
|
+
const bodyData = {
|
|
3340
|
+
token,
|
|
3341
|
+
old_password: data.oldPassword,
|
|
3342
|
+
new_password: data.newPassword
|
|
3343
|
+
};
|
|
3344
|
+
return env2?.requests?.post("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
3345
|
+
headers: {
|
|
3346
|
+
"Content-Type": "application/json"
|
|
3347
|
+
}
|
|
3511
3348
|
});
|
|
3512
3349
|
},
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3523
|
-
{ state, access_token },
|
|
3524
|
-
{
|
|
3525
|
-
headers: {
|
|
3526
|
-
"Content-Type": "application/json"
|
|
3527
|
-
}
|
|
3528
|
-
}
|
|
3529
|
-
);
|
|
3350
|
+
async isValidToken(token) {
|
|
3351
|
+
const env2 = getEnv();
|
|
3352
|
+
const bodyData = {
|
|
3353
|
+
token
|
|
3354
|
+
};
|
|
3355
|
+
return env2?.requests?.post("/check_token" /* TOKEN */, bodyData, {
|
|
3356
|
+
headers: {
|
|
3357
|
+
"Content-Type": "application/json"
|
|
3358
|
+
}
|
|
3530
3359
|
});
|
|
3531
3360
|
},
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3361
|
+
async isValidActionToken(actionToken, path) {
|
|
3362
|
+
const env2 = getEnv();
|
|
3363
|
+
return env2?.requests?.post(
|
|
3364
|
+
path,
|
|
3365
|
+
{},
|
|
3366
|
+
{
|
|
3367
|
+
headers: {
|
|
3368
|
+
"Content-Type": "application/json"
|
|
3369
|
+
},
|
|
3370
|
+
useActionToken: true,
|
|
3371
|
+
actionToken
|
|
3372
|
+
}
|
|
3373
|
+
);
|
|
3538
3374
|
},
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
{
|
|
3552
|
-
headers: {
|
|
3553
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3554
|
-
}
|
|
3375
|
+
async loginSocial({
|
|
3376
|
+
db,
|
|
3377
|
+
state,
|
|
3378
|
+
access_token
|
|
3379
|
+
}) {
|
|
3380
|
+
const env2 = getEnv();
|
|
3381
|
+
return env2?.requests?.post(
|
|
3382
|
+
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
3383
|
+
{ state, access_token },
|
|
3384
|
+
{
|
|
3385
|
+
headers: {
|
|
3386
|
+
"Content-Type": "application/json"
|
|
3555
3387
|
}
|
|
3556
|
-
|
|
3557
|
-
|
|
3388
|
+
}
|
|
3389
|
+
);
|
|
3558
3390
|
},
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3391
|
+
async getProviders(db) {
|
|
3392
|
+
const env2 = getEnv();
|
|
3393
|
+
return env2?.requests?.get("/oauth/providers", { params: { db } });
|
|
3394
|
+
},
|
|
3395
|
+
async getAccessByCode(code) {
|
|
3396
|
+
const env2 = getEnv();
|
|
3397
|
+
const data = new URLSearchParams();
|
|
3398
|
+
data.append("code", code);
|
|
3399
|
+
data.append("grant_type", "authorization_code");
|
|
3400
|
+
data.append("client_id", env2?.config?.clientId || "");
|
|
3401
|
+
data.append("redirect_uri", env2?.config?.redirectUri || "");
|
|
3402
|
+
return env2?.requests?.post(
|
|
3403
|
+
`${env2?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
|
|
3404
|
+
data,
|
|
3405
|
+
{
|
|
3406
|
+
headers: {
|
|
3407
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3573
3408
|
}
|
|
3574
|
-
|
|
3575
|
-
|
|
3409
|
+
}
|
|
3410
|
+
);
|
|
3411
|
+
},
|
|
3412
|
+
async logout(data) {
|
|
3413
|
+
const env2 = getEnv();
|
|
3414
|
+
console.log(data);
|
|
3415
|
+
return env2?.requests?.post(
|
|
3416
|
+
"/logout" /* LOGOUT */,
|
|
3417
|
+
{},
|
|
3418
|
+
{
|
|
3419
|
+
headers: {
|
|
3420
|
+
"Content-Type": "application/json"
|
|
3421
|
+
},
|
|
3422
|
+
withCredentials: true,
|
|
3423
|
+
useRefreshToken: true
|
|
3424
|
+
}
|
|
3425
|
+
);
|
|
3576
3426
|
}
|
|
3577
3427
|
};
|
|
3578
3428
|
var auth_service_default = AuthService;
|
|
3579
3429
|
|
|
3580
3430
|
// src/services/company-service/index.ts
|
|
3581
3431
|
var CompanyService = {
|
|
3582
|
-
getCurrentCompany() {
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
}
|
|
3589
|
-
});
|
|
3432
|
+
async getCurrentCompany() {
|
|
3433
|
+
const env2 = getEnv();
|
|
3434
|
+
return await env2.requests.get("/company" /* COMPANY_PATH */, {
|
|
3435
|
+
headers: {
|
|
3436
|
+
"Content-Type": "application/json"
|
|
3437
|
+
}
|
|
3590
3438
|
});
|
|
3591
3439
|
},
|
|
3592
|
-
getInfoCompany(id) {
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
display_name: {},
|
|
3606
|
-
secondary_logo: {}
|
|
3607
|
-
}
|
|
3608
|
-
}
|
|
3609
|
-
};
|
|
3610
|
-
return yield (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
3611
|
-
headers: {
|
|
3612
|
-
"Content-Type": "application/json"
|
|
3440
|
+
async getInfoCompany(id) {
|
|
3441
|
+
const env2 = getEnv();
|
|
3442
|
+
const jsonData = {
|
|
3443
|
+
ids: [id],
|
|
3444
|
+
model: "res.company" /* COMPANY */,
|
|
3445
|
+
method: "web_read" /* WEB_READ */,
|
|
3446
|
+
kwargs: {
|
|
3447
|
+
specification: {
|
|
3448
|
+
primary_color: {},
|
|
3449
|
+
secondary_color: {},
|
|
3450
|
+
logo: {},
|
|
3451
|
+
display_name: {},
|
|
3452
|
+
secondary_logo: {}
|
|
3613
3453
|
}
|
|
3614
|
-
}
|
|
3454
|
+
}
|
|
3455
|
+
};
|
|
3456
|
+
return await env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
3457
|
+
headers: {
|
|
3458
|
+
"Content-Type": "application/json"
|
|
3459
|
+
}
|
|
3615
3460
|
});
|
|
3616
3461
|
}
|
|
3617
3462
|
};
|
|
@@ -3619,328 +3464,300 @@ var company_service_default = CompanyService;
|
|
|
3619
3464
|
|
|
3620
3465
|
// src/services/excel-service/index.ts
|
|
3621
3466
|
var ExcelService = {
|
|
3622
|
-
uploadFile(
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
}
|
|
3629
|
-
});
|
|
3467
|
+
async uploadFile({ formData }) {
|
|
3468
|
+
const env2 = getEnv();
|
|
3469
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3470
|
+
headers: {
|
|
3471
|
+
"Content-Type": "multipart/form-data"
|
|
3472
|
+
}
|
|
3630
3473
|
});
|
|
3631
3474
|
},
|
|
3632
|
-
uploadIdFile(
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
}
|
|
3639
|
-
});
|
|
3475
|
+
async uploadIdFile({ formData }) {
|
|
3476
|
+
const env2 = getEnv();
|
|
3477
|
+
return env2.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
3478
|
+
headers: {
|
|
3479
|
+
"Content-Type": "multipart/form-data"
|
|
3480
|
+
}
|
|
3640
3481
|
});
|
|
3641
3482
|
},
|
|
3642
|
-
parsePreview(
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
tracking_disable: true
|
|
3675
|
-
}
|
|
3676
|
-
},
|
|
3677
|
-
with_context: context
|
|
3678
|
-
};
|
|
3679
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3680
|
-
headers: {
|
|
3681
|
-
"Content-Type": "multipart/form-data"
|
|
3483
|
+
async parsePreview({
|
|
3484
|
+
id,
|
|
3485
|
+
selectedSheet,
|
|
3486
|
+
isHeader,
|
|
3487
|
+
context
|
|
3488
|
+
}) {
|
|
3489
|
+
const env2 = getEnv();
|
|
3490
|
+
const jsonData = {
|
|
3491
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3492
|
+
method: "parse_preview",
|
|
3493
|
+
ids: [id],
|
|
3494
|
+
kwargs: {
|
|
3495
|
+
options: {
|
|
3496
|
+
import_skip_records: [],
|
|
3497
|
+
import_set_empty_fields: [],
|
|
3498
|
+
fallback_values: {},
|
|
3499
|
+
name_create_enabled_fields: {},
|
|
3500
|
+
encoding: "",
|
|
3501
|
+
separator: "",
|
|
3502
|
+
quoting: '"',
|
|
3503
|
+
date_format: "",
|
|
3504
|
+
datetime_format: "",
|
|
3505
|
+
float_thousand_separator: ",",
|
|
3506
|
+
float_decimal_separator: ".",
|
|
3507
|
+
advanced: true,
|
|
3508
|
+
has_headers: isHeader,
|
|
3509
|
+
keep_matches: false,
|
|
3510
|
+
limit: 2e3,
|
|
3511
|
+
sheets: [],
|
|
3512
|
+
sheet: selectedSheet,
|
|
3513
|
+
skip: 0,
|
|
3514
|
+
tracking_disable: true
|
|
3682
3515
|
}
|
|
3683
|
-
}
|
|
3516
|
+
},
|
|
3517
|
+
with_context: context
|
|
3518
|
+
};
|
|
3519
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3520
|
+
headers: {
|
|
3521
|
+
"Content-Type": "multipart/form-data"
|
|
3522
|
+
}
|
|
3684
3523
|
});
|
|
3685
3524
|
},
|
|
3686
|
-
executeImport(
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
}
|
|
3712
|
-
});
|
|
3525
|
+
async executeImport({
|
|
3526
|
+
columns,
|
|
3527
|
+
fields,
|
|
3528
|
+
idFile,
|
|
3529
|
+
options,
|
|
3530
|
+
dryrun,
|
|
3531
|
+
context
|
|
3532
|
+
}) {
|
|
3533
|
+
const env2 = getEnv();
|
|
3534
|
+
const jsonData = {
|
|
3535
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
3536
|
+
method: "execute_import",
|
|
3537
|
+
ids: [idFile],
|
|
3538
|
+
kwargs: {
|
|
3539
|
+
fields,
|
|
3540
|
+
columns,
|
|
3541
|
+
options,
|
|
3542
|
+
dryrun
|
|
3543
|
+
},
|
|
3544
|
+
with_context: context
|
|
3545
|
+
};
|
|
3546
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3547
|
+
headers: {
|
|
3548
|
+
"Content-Type": "multipart/form-data"
|
|
3549
|
+
}
|
|
3713
3550
|
});
|
|
3714
3551
|
},
|
|
3715
|
-
getFileExcel(
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3724
|
-
});
|
|
3552
|
+
async getFileExcel({ model }) {
|
|
3553
|
+
const env2 = getEnv();
|
|
3554
|
+
const jsonData = {
|
|
3555
|
+
model,
|
|
3556
|
+
method: "get_import_templates" /* GET_IMPORT */,
|
|
3557
|
+
args: []
|
|
3558
|
+
};
|
|
3559
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
3725
3560
|
},
|
|
3726
|
-
getFieldExport(
|
|
3727
|
-
|
|
3728
|
-
|
|
3561
|
+
async getFieldExport({
|
|
3562
|
+
ids,
|
|
3563
|
+
model,
|
|
3564
|
+
isShow,
|
|
3565
|
+
parentField,
|
|
3566
|
+
fieldType,
|
|
3567
|
+
parentName,
|
|
3568
|
+
prefix,
|
|
3569
|
+
name,
|
|
3570
|
+
context,
|
|
3571
|
+
importCompat
|
|
3572
|
+
}) {
|
|
3573
|
+
const env2 = getEnv();
|
|
3574
|
+
const jsonData = {
|
|
3729
3575
|
model,
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
domain: [["id", "in", ids]],
|
|
3744
|
-
with_context: context
|
|
3745
|
-
};
|
|
3746
|
-
if (isShow) {
|
|
3747
|
-
jsonData.parent_field = parentField;
|
|
3748
|
-
jsonData.parent_field_type = fieldType;
|
|
3749
|
-
jsonData.parent_name = parentName;
|
|
3750
|
-
jsonData.name = name;
|
|
3751
|
-
jsonData.prefix = prefix;
|
|
3752
|
-
jsonData.exclude = [null];
|
|
3753
|
-
}
|
|
3754
|
-
return env2.requests.post("/export/get_fields", jsonData);
|
|
3755
|
-
});
|
|
3576
|
+
import_compat: importCompat,
|
|
3577
|
+
domain: [["id", "in", ids]],
|
|
3578
|
+
with_context: context
|
|
3579
|
+
};
|
|
3580
|
+
if (isShow) {
|
|
3581
|
+
jsonData.parent_field = parentField;
|
|
3582
|
+
jsonData.parent_field_type = fieldType;
|
|
3583
|
+
jsonData.parent_name = parentName;
|
|
3584
|
+
jsonData.name = name;
|
|
3585
|
+
jsonData.prefix = prefix;
|
|
3586
|
+
jsonData.exclude = [null];
|
|
3587
|
+
}
|
|
3588
|
+
return env2.requests.post("/export/get_fields", jsonData);
|
|
3756
3589
|
},
|
|
3757
|
-
exportExcel(
|
|
3758
|
-
|
|
3590
|
+
async exportExcel({
|
|
3591
|
+
model,
|
|
3592
|
+
domain,
|
|
3593
|
+
ids,
|
|
3594
|
+
fields,
|
|
3595
|
+
type,
|
|
3596
|
+
importCompat,
|
|
3597
|
+
context,
|
|
3598
|
+
groupby
|
|
3599
|
+
}) {
|
|
3600
|
+
const env2 = getEnv();
|
|
3601
|
+
const jsonData = {
|
|
3759
3602
|
model,
|
|
3760
3603
|
domain,
|
|
3761
3604
|
ids,
|
|
3605
|
+
import_compat: importCompat,
|
|
3762
3606
|
fields,
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
}) {
|
|
3768
|
-
const env2 = getEnv();
|
|
3769
|
-
const jsonData = {
|
|
3770
|
-
model,
|
|
3771
|
-
domain,
|
|
3772
|
-
ids,
|
|
3773
|
-
import_compat: importCompat,
|
|
3774
|
-
fields,
|
|
3775
|
-
with_context: context,
|
|
3776
|
-
groupby: groupby != null ? groupby : []
|
|
3777
|
-
};
|
|
3778
|
-
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3779
|
-
});
|
|
3607
|
+
with_context: context,
|
|
3608
|
+
groupby: groupby ?? []
|
|
3609
|
+
};
|
|
3610
|
+
return env2.requests.post_excel(`/export/${type}`, jsonData);
|
|
3780
3611
|
}
|
|
3781
3612
|
};
|
|
3782
3613
|
var excel_service_default = ExcelService;
|
|
3783
3614
|
|
|
3784
3615
|
// src/services/form-service/index.ts
|
|
3785
3616
|
var FormService = {
|
|
3786
|
-
getComment(
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
}
|
|
3807
|
-
});
|
|
3808
|
-
},
|
|
3809
|
-
sentComment(_0) {
|
|
3810
|
-
return __async(this, arguments, function* ({ data }) {
|
|
3811
|
-
try {
|
|
3812
|
-
const env2 = getEnv();
|
|
3813
|
-
const jsonData = {
|
|
3814
|
-
context: {
|
|
3815
|
-
tz: "Asia/Saigon",
|
|
3816
|
-
uid: 2,
|
|
3817
|
-
allowed_company_ids: [1],
|
|
3818
|
-
mail_post_autofollow: false,
|
|
3819
|
-
temporary_id: 142183.01
|
|
3820
|
-
},
|
|
3821
|
-
post_data: {
|
|
3822
|
-
body: data.message,
|
|
3823
|
-
message_type: "comment",
|
|
3824
|
-
attachment_ids: data.attachment_ids,
|
|
3825
|
-
attachment_tokens: [],
|
|
3826
|
-
subtype_xmlid: data.subtype
|
|
3827
|
-
},
|
|
3828
|
-
thread_id: Number(data.thread_id),
|
|
3829
|
-
thread_model: data.thread_model
|
|
3830
|
-
};
|
|
3831
|
-
return env2.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
3832
|
-
headers: {
|
|
3833
|
-
"Content-Type": "application/json"
|
|
3834
|
-
}
|
|
3835
|
-
});
|
|
3836
|
-
} catch (error) {
|
|
3837
|
-
console.error("Error when sent message:", error);
|
|
3838
|
-
throw error;
|
|
3839
|
-
}
|
|
3840
|
-
});
|
|
3617
|
+
async getComment({ data }) {
|
|
3618
|
+
try {
|
|
3619
|
+
const env2 = getEnv();
|
|
3620
|
+
const jsonData = {
|
|
3621
|
+
thread_id: data.thread_id,
|
|
3622
|
+
thread_model: data.thread_model,
|
|
3623
|
+
limit: 100,
|
|
3624
|
+
with_context: {
|
|
3625
|
+
lang: data.lang
|
|
3626
|
+
}
|
|
3627
|
+
};
|
|
3628
|
+
return env2.requests.post("/chatter/thread/messages" /* GET_MESSAGE */, jsonData, {
|
|
3629
|
+
headers: {
|
|
3630
|
+
"Content-Type": "application/json"
|
|
3631
|
+
}
|
|
3632
|
+
});
|
|
3633
|
+
} catch (error) {
|
|
3634
|
+
console.error("Error when sending message:", error);
|
|
3635
|
+
throw error;
|
|
3636
|
+
}
|
|
3841
3637
|
},
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3638
|
+
async sentComment({ data }) {
|
|
3639
|
+
try {
|
|
3640
|
+
const env2 = getEnv();
|
|
3641
|
+
const jsonData = {
|
|
3642
|
+
context: {
|
|
3643
|
+
tz: "Asia/Saigon",
|
|
3644
|
+
uid: 2,
|
|
3645
|
+
allowed_company_ids: [1],
|
|
3646
|
+
mail_post_autofollow: false,
|
|
3647
|
+
temporary_id: 142183.01
|
|
3648
|
+
},
|
|
3649
|
+
post_data: {
|
|
3650
|
+
body: data.message,
|
|
3651
|
+
message_type: "comment",
|
|
3652
|
+
attachment_ids: data.attachment_ids,
|
|
3848
3653
|
attachment_tokens: [],
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
getImage(_0) {
|
|
3864
|
-
return __async(this, arguments, function* ({ data }) {
|
|
3865
|
-
try {
|
|
3866
|
-
const env2 = getEnv();
|
|
3867
|
-
return env2.requests.get(
|
|
3868
|
-
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
3869
|
-
{
|
|
3870
|
-
headers: {
|
|
3871
|
-
"Content-Type": "application/json"
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
);
|
|
3875
|
-
} catch (error) {
|
|
3876
|
-
console.error("Error when sent message:", error);
|
|
3877
|
-
throw error;
|
|
3878
|
-
}
|
|
3879
|
-
});
|
|
3654
|
+
subtype_xmlid: data.subtype
|
|
3655
|
+
},
|
|
3656
|
+
thread_id: Number(data.thread_id),
|
|
3657
|
+
thread_model: data.thread_model
|
|
3658
|
+
};
|
|
3659
|
+
return env2.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
3660
|
+
headers: {
|
|
3661
|
+
"Content-Type": "application/json"
|
|
3662
|
+
}
|
|
3663
|
+
});
|
|
3664
|
+
} catch (error) {
|
|
3665
|
+
console.error("Error when sent message:", error);
|
|
3666
|
+
throw error;
|
|
3667
|
+
}
|
|
3880
3668
|
},
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3669
|
+
async deleteComment({ data }) {
|
|
3670
|
+
try {
|
|
3671
|
+
const env2 = getEnv();
|
|
3672
|
+
const jsonData = {
|
|
3673
|
+
attachment_ids: [],
|
|
3674
|
+
attachment_tokens: [],
|
|
3675
|
+
body: "",
|
|
3676
|
+
message_id: data.message_id
|
|
3677
|
+
};
|
|
3678
|
+
return env2.requests.post("/chatter/message/update_content" /* DELETE_MESSAGE */, jsonData, {
|
|
3679
|
+
headers: {
|
|
3680
|
+
"Content-Type": "application/json"
|
|
3681
|
+
}
|
|
3682
|
+
});
|
|
3683
|
+
} catch (error) {
|
|
3684
|
+
console.error("Error when sent message:", error);
|
|
3685
|
+
throw error;
|
|
3686
|
+
}
|
|
3895
3687
|
},
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
method: "get_formview_action",
|
|
3903
|
-
ids: data.id ? [data.id] : [],
|
|
3904
|
-
with_context: data.context
|
|
3905
|
-
};
|
|
3906
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3688
|
+
async getImage({ data }) {
|
|
3689
|
+
try {
|
|
3690
|
+
const env2 = getEnv();
|
|
3691
|
+
return env2.requests.get(
|
|
3692
|
+
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
3693
|
+
{
|
|
3907
3694
|
headers: {
|
|
3908
3695
|
"Content-Type": "application/json"
|
|
3909
3696
|
}
|
|
3910
|
-
}
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
}
|
|
3697
|
+
}
|
|
3698
|
+
);
|
|
3699
|
+
} catch (error) {
|
|
3700
|
+
console.error("Error when sent message:", error);
|
|
3701
|
+
throw error;
|
|
3702
|
+
}
|
|
3916
3703
|
},
|
|
3917
|
-
|
|
3918
|
-
|
|
3704
|
+
async uploadImage({ data }) {
|
|
3705
|
+
try {
|
|
3706
|
+
const env2 = getEnv();
|
|
3707
|
+
return env2.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
|
|
3708
|
+
headers: {
|
|
3709
|
+
"Content-Type": "multipart/form-data"
|
|
3710
|
+
}
|
|
3711
|
+
});
|
|
3712
|
+
} catch (error) {
|
|
3713
|
+
console.error("Error when sent message:", error);
|
|
3714
|
+
throw error;
|
|
3715
|
+
}
|
|
3716
|
+
},
|
|
3717
|
+
async getFormView({ data }) {
|
|
3718
|
+
try {
|
|
3919
3719
|
const env2 = getEnv();
|
|
3920
|
-
const vals = {
|
|
3921
|
-
[data.name]: data.stage_id
|
|
3922
|
-
};
|
|
3923
3720
|
const jsonData = {
|
|
3924
3721
|
model: data.model,
|
|
3925
|
-
method: "
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
allowed_company_ids: [1],
|
|
3929
|
-
uid: 2,
|
|
3930
|
-
search_default_my_ticket: true,
|
|
3931
|
-
search_default_is_open: true
|
|
3932
|
-
},
|
|
3933
|
-
ids: [data.id],
|
|
3934
|
-
kwargs: {
|
|
3935
|
-
vals,
|
|
3936
|
-
specification: {}
|
|
3937
|
-
}
|
|
3722
|
+
method: "get_formview_action",
|
|
3723
|
+
ids: data.id ? [data.id] : [],
|
|
3724
|
+
with_context: data.context
|
|
3938
3725
|
};
|
|
3939
3726
|
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3940
3727
|
headers: {
|
|
3941
3728
|
"Content-Type": "application/json"
|
|
3942
3729
|
}
|
|
3943
3730
|
});
|
|
3731
|
+
} catch (error) {
|
|
3732
|
+
console.error("Error when fetching form view:", error);
|
|
3733
|
+
throw error;
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
async changeStatus({ data }) {
|
|
3737
|
+
const env2 = getEnv();
|
|
3738
|
+
const vals = {
|
|
3739
|
+
[data.name]: data.stage_id
|
|
3740
|
+
};
|
|
3741
|
+
const jsonData = {
|
|
3742
|
+
model: data.model,
|
|
3743
|
+
method: "web_save",
|
|
3744
|
+
with_context: {
|
|
3745
|
+
lang: data.lang,
|
|
3746
|
+
allowed_company_ids: [1],
|
|
3747
|
+
uid: 2,
|
|
3748
|
+
search_default_my_ticket: true,
|
|
3749
|
+
search_default_is_open: true
|
|
3750
|
+
},
|
|
3751
|
+
ids: [data.id],
|
|
3752
|
+
kwargs: {
|
|
3753
|
+
vals,
|
|
3754
|
+
specification: {}
|
|
3755
|
+
}
|
|
3756
|
+
};
|
|
3757
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3758
|
+
headers: {
|
|
3759
|
+
"Content-Type": "application/json"
|
|
3760
|
+
}
|
|
3944
3761
|
});
|
|
3945
3762
|
}
|
|
3946
3763
|
};
|
|
@@ -3948,55 +3765,51 @@ var form_service_default = FormService;
|
|
|
3948
3765
|
|
|
3949
3766
|
// src/services/kanban-service/index.ts
|
|
3950
3767
|
var KanbanServices = {
|
|
3951
|
-
getGroups(
|
|
3952
|
-
|
|
3768
|
+
async getGroups({
|
|
3769
|
+
model,
|
|
3770
|
+
width_context
|
|
3771
|
+
}) {
|
|
3772
|
+
const env2 = getEnv();
|
|
3773
|
+
const jsonDataView = {
|
|
3953
3774
|
model,
|
|
3775
|
+
method: "web_read_group",
|
|
3776
|
+
kwargs: {
|
|
3777
|
+
domain: [["stage_id.fold", "=", false]],
|
|
3778
|
+
fields: ["color:sum"],
|
|
3779
|
+
groupby: ["stage_id"]
|
|
3780
|
+
},
|
|
3954
3781
|
width_context
|
|
3955
|
-
}
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
kwargs: {
|
|
3961
|
-
domain: [["stage_id.fold", "=", false]],
|
|
3962
|
-
fields: ["color:sum"],
|
|
3963
|
-
groupby: ["stage_id"]
|
|
3964
|
-
},
|
|
3965
|
-
width_context
|
|
3966
|
-
};
|
|
3967
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3968
|
-
headers: {
|
|
3969
|
-
"Content-Type": "application/json"
|
|
3970
|
-
}
|
|
3971
|
-
});
|
|
3782
|
+
};
|
|
3783
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3784
|
+
headers: {
|
|
3785
|
+
"Content-Type": "application/json"
|
|
3786
|
+
}
|
|
3972
3787
|
});
|
|
3973
3788
|
},
|
|
3974
|
-
getProgressBar(
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3789
|
+
async getProgressBar({
|
|
3790
|
+
field,
|
|
3791
|
+
color,
|
|
3792
|
+
model,
|
|
3793
|
+
width_context
|
|
3794
|
+
}) {
|
|
3795
|
+
const env2 = getEnv();
|
|
3796
|
+
const jsonDataView = {
|
|
3978
3797
|
model,
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
domain: [],
|
|
3987
|
-
group_by: "stage_id",
|
|
3988
|
-
progress_bar: {
|
|
3989
|
-
colors: color,
|
|
3990
|
-
field
|
|
3991
|
-
}
|
|
3992
|
-
},
|
|
3993
|
-
width_context
|
|
3994
|
-
};
|
|
3995
|
-
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3996
|
-
headers: {
|
|
3997
|
-
"Content-Type": "application/json"
|
|
3798
|
+
method: "read_progress_bar",
|
|
3799
|
+
kwargs: {
|
|
3800
|
+
domain: [],
|
|
3801
|
+
group_by: "stage_id",
|
|
3802
|
+
progress_bar: {
|
|
3803
|
+
colors: color,
|
|
3804
|
+
field
|
|
3998
3805
|
}
|
|
3999
|
-
}
|
|
3806
|
+
},
|
|
3807
|
+
width_context
|
|
3808
|
+
};
|
|
3809
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
3810
|
+
headers: {
|
|
3811
|
+
"Content-Type": "application/json"
|
|
3812
|
+
}
|
|
4000
3813
|
});
|
|
4001
3814
|
}
|
|
4002
3815
|
};
|
|
@@ -4005,285 +3818,259 @@ var kanban_service_default = KanbanServices;
|
|
|
4005
3818
|
// src/services/model-service/index.ts
|
|
4006
3819
|
var OBJECT_POSITION = 2;
|
|
4007
3820
|
var ModelService = {
|
|
4008
|
-
getListMyBankAccount(
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
}
|
|
4029
|
-
});
|
|
3821
|
+
async getListMyBankAccount({
|
|
3822
|
+
domain,
|
|
3823
|
+
spectification,
|
|
3824
|
+
model
|
|
3825
|
+
}) {
|
|
3826
|
+
const env2 = getEnv();
|
|
3827
|
+
const jsonData = {
|
|
3828
|
+
model,
|
|
3829
|
+
method: "web_search_read",
|
|
3830
|
+
kwargs: {
|
|
3831
|
+
specification: spectification,
|
|
3832
|
+
domain,
|
|
3833
|
+
limit: 100,
|
|
3834
|
+
offset: 0
|
|
3835
|
+
}
|
|
3836
|
+
};
|
|
3837
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3838
|
+
headers: {
|
|
3839
|
+
"Content-Type": "application/json"
|
|
3840
|
+
}
|
|
4030
3841
|
});
|
|
4031
3842
|
},
|
|
4032
|
-
getCurrency() {
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
}
|
|
4052
|
-
});
|
|
3843
|
+
async getCurrency() {
|
|
3844
|
+
const env2 = getEnv();
|
|
3845
|
+
const jsonData = {
|
|
3846
|
+
model: "res.currency",
|
|
3847
|
+
method: "web_search_read",
|
|
3848
|
+
kwargs: {
|
|
3849
|
+
specification: {
|
|
3850
|
+
icon_url: {},
|
|
3851
|
+
name: {}
|
|
3852
|
+
},
|
|
3853
|
+
domain: [["active", "=", true]],
|
|
3854
|
+
limit: 100,
|
|
3855
|
+
offset: 0
|
|
3856
|
+
}
|
|
3857
|
+
};
|
|
3858
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3859
|
+
headers: {
|
|
3860
|
+
"Content-Type": "application/json"
|
|
3861
|
+
}
|
|
4053
3862
|
});
|
|
4054
3863
|
},
|
|
4055
|
-
getConversionRate() {
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
sell: {}
|
|
4069
|
-
}
|
|
3864
|
+
async getConversionRate() {
|
|
3865
|
+
const env2 = getEnv();
|
|
3866
|
+
const jsonData = {
|
|
3867
|
+
model: "res.currency",
|
|
3868
|
+
method: "web_search_read",
|
|
3869
|
+
kwargs: {
|
|
3870
|
+
specification: {
|
|
3871
|
+
name: {},
|
|
3872
|
+
icon_url: {},
|
|
3873
|
+
rate_ids: {
|
|
3874
|
+
fields: {
|
|
3875
|
+
company_rate: {},
|
|
3876
|
+
sell: {}
|
|
4070
3877
|
}
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
}
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
}
|
|
3878
|
+
}
|
|
3879
|
+
},
|
|
3880
|
+
domain: [["active", "=", true]],
|
|
3881
|
+
limit: 100,
|
|
3882
|
+
offset: 0
|
|
3883
|
+
}
|
|
3884
|
+
};
|
|
3885
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3886
|
+
headers: {
|
|
3887
|
+
"Content-Type": "application/json"
|
|
3888
|
+
}
|
|
4082
3889
|
});
|
|
4083
|
-
},
|
|
4084
|
-
getAll(
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
});
|
|
3890
|
+
},
|
|
3891
|
+
async getAll({ data }) {
|
|
3892
|
+
const env2 = getEnv();
|
|
3893
|
+
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3894
|
+
fields: data.fields,
|
|
3895
|
+
groupby: data.groupby
|
|
3896
|
+
} : {
|
|
3897
|
+
count_limit: 10001,
|
|
3898
|
+
order: data.sort,
|
|
3899
|
+
specification: data.specification
|
|
3900
|
+
};
|
|
3901
|
+
const jsonData = {
|
|
3902
|
+
model: String(data.model),
|
|
3903
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3904
|
+
ids: data.ids,
|
|
3905
|
+
with_context: data.context,
|
|
3906
|
+
kwargs: {
|
|
3907
|
+
domain: data.domain,
|
|
3908
|
+
limit: data.limit,
|
|
3909
|
+
offset: data.offset,
|
|
3910
|
+
...jsonReadGroup
|
|
3911
|
+
}
|
|
3912
|
+
};
|
|
3913
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3914
|
+
headers: {
|
|
3915
|
+
"Content-Type": "application/json"
|
|
3916
|
+
}
|
|
4111
3917
|
});
|
|
4112
3918
|
},
|
|
4113
|
-
getListCalendar(
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
3919
|
+
async getListCalendar({ data }) {
|
|
3920
|
+
const env2 = getEnv();
|
|
3921
|
+
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3922
|
+
fields: data.fields,
|
|
3923
|
+
groupby: data.groupby
|
|
3924
|
+
} : {
|
|
3925
|
+
count_limit: 10001,
|
|
3926
|
+
order: data.sort,
|
|
3927
|
+
specification: data.specification
|
|
3928
|
+
};
|
|
3929
|
+
const jsonData = {
|
|
3930
|
+
model: String(data.model),
|
|
3931
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
3932
|
+
ids: data.ids,
|
|
3933
|
+
with_context: data.context,
|
|
3934
|
+
kwargs: {
|
|
3935
|
+
domain: data.domain,
|
|
3936
|
+
limit: data.limit,
|
|
3937
|
+
offset: data.offset,
|
|
4117
3938
|
fields: data.fields,
|
|
4118
|
-
|
|
4119
|
-
}
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
model: String(data.model),
|
|
4126
|
-
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
4127
|
-
ids: data.ids,
|
|
4128
|
-
with_context: data.context,
|
|
4129
|
-
kwargs: __spreadValues({
|
|
4130
|
-
domain: data.domain,
|
|
4131
|
-
limit: data.limit,
|
|
4132
|
-
offset: data.offset,
|
|
4133
|
-
fields: data.fields
|
|
4134
|
-
}, jsonReadGroup)
|
|
4135
|
-
};
|
|
4136
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4137
|
-
headers: {
|
|
4138
|
-
"Content-Type": "application/json"
|
|
4139
|
-
}
|
|
4140
|
-
});
|
|
3939
|
+
...jsonReadGroup
|
|
3940
|
+
}
|
|
3941
|
+
};
|
|
3942
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3943
|
+
headers: {
|
|
3944
|
+
"Content-Type": "application/json"
|
|
3945
|
+
}
|
|
4141
3946
|
});
|
|
4142
3947
|
},
|
|
4143
|
-
getList(
|
|
4144
|
-
|
|
3948
|
+
async getList({
|
|
3949
|
+
model,
|
|
3950
|
+
ids = [],
|
|
3951
|
+
specification = {},
|
|
3952
|
+
domain = [],
|
|
3953
|
+
offset,
|
|
3954
|
+
order,
|
|
3955
|
+
context = {},
|
|
3956
|
+
limit = 10
|
|
3957
|
+
}) {
|
|
3958
|
+
const env2 = getEnv();
|
|
3959
|
+
const jsonData = {
|
|
4145
3960
|
model,
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
kwargs: {
|
|
4162
|
-
specification,
|
|
4163
|
-
domain,
|
|
4164
|
-
limit,
|
|
4165
|
-
offset,
|
|
4166
|
-
order
|
|
4167
|
-
}
|
|
4168
|
-
};
|
|
4169
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4170
|
-
headers: {
|
|
4171
|
-
"Content-Type": "application/json"
|
|
4172
|
-
}
|
|
4173
|
-
});
|
|
3961
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
3962
|
+
ids,
|
|
3963
|
+
with_context: context,
|
|
3964
|
+
kwargs: {
|
|
3965
|
+
specification,
|
|
3966
|
+
domain,
|
|
3967
|
+
limit,
|
|
3968
|
+
offset,
|
|
3969
|
+
order
|
|
3970
|
+
}
|
|
3971
|
+
};
|
|
3972
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
3973
|
+
headers: {
|
|
3974
|
+
"Content-Type": "application/json"
|
|
3975
|
+
}
|
|
4174
3976
|
});
|
|
4175
3977
|
},
|
|
4176
|
-
getDetail(
|
|
4177
|
-
|
|
4178
|
-
|
|
3978
|
+
async getDetail({
|
|
3979
|
+
ids = [],
|
|
3980
|
+
model,
|
|
3981
|
+
specification,
|
|
3982
|
+
context
|
|
3983
|
+
}) {
|
|
3984
|
+
const env2 = getEnv();
|
|
3985
|
+
const jsonData = {
|
|
4179
3986
|
model,
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
specification
|
|
4192
|
-
}
|
|
4193
|
-
};
|
|
4194
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4195
|
-
headers: {
|
|
4196
|
-
"Content-Type": "application/json"
|
|
4197
|
-
}
|
|
4198
|
-
});
|
|
3987
|
+
method: "web_read" /* WEB_READ */,
|
|
3988
|
+
ids,
|
|
3989
|
+
with_context: context,
|
|
3990
|
+
kwargs: {
|
|
3991
|
+
specification
|
|
3992
|
+
}
|
|
3993
|
+
};
|
|
3994
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
3995
|
+
headers: {
|
|
3996
|
+
"Content-Type": "application/json"
|
|
3997
|
+
}
|
|
4199
3998
|
});
|
|
4200
3999
|
},
|
|
4201
|
-
save(
|
|
4202
|
-
|
|
4000
|
+
async save({
|
|
4001
|
+
model,
|
|
4002
|
+
ids = [],
|
|
4003
|
+
data = {},
|
|
4004
|
+
specification = {},
|
|
4005
|
+
context = {},
|
|
4006
|
+
path
|
|
4007
|
+
}) {
|
|
4008
|
+
const env2 = getEnv();
|
|
4009
|
+
const jsonData = {
|
|
4203
4010
|
model,
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
ids,
|
|
4217
|
-
kwargs: {
|
|
4218
|
-
vals: data,
|
|
4219
|
-
specification
|
|
4220
|
-
}
|
|
4221
|
-
};
|
|
4222
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post(path != null ? path : "/call" /* CALL_PATH */, jsonData, {
|
|
4223
|
-
headers: {
|
|
4224
|
-
"Content-Type": "application/json"
|
|
4225
|
-
}
|
|
4226
|
-
});
|
|
4011
|
+
method: "web_save" /* WEB_SAVE */,
|
|
4012
|
+
with_context: context,
|
|
4013
|
+
ids,
|
|
4014
|
+
kwargs: {
|
|
4015
|
+
vals: data,
|
|
4016
|
+
specification
|
|
4017
|
+
}
|
|
4018
|
+
};
|
|
4019
|
+
return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
4020
|
+
headers: {
|
|
4021
|
+
"Content-Type": "application/json"
|
|
4022
|
+
}
|
|
4227
4023
|
});
|
|
4228
4024
|
},
|
|
4229
|
-
delete(
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
"Content-Type": "application/json"
|
|
4241
|
-
}
|
|
4242
|
-
});
|
|
4025
|
+
async delete({ ids = [], model }) {
|
|
4026
|
+
const env2 = getEnv();
|
|
4027
|
+
const jsonData = {
|
|
4028
|
+
model,
|
|
4029
|
+
method: "unlink" /* UNLINK */,
|
|
4030
|
+
ids
|
|
4031
|
+
};
|
|
4032
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4033
|
+
headers: {
|
|
4034
|
+
"Content-Type": "application/json"
|
|
4035
|
+
}
|
|
4243
4036
|
});
|
|
4244
4037
|
},
|
|
4245
|
-
onChange(
|
|
4246
|
-
|
|
4247
|
-
|
|
4038
|
+
async onChange({
|
|
4039
|
+
ids = [],
|
|
4040
|
+
model,
|
|
4041
|
+
object,
|
|
4042
|
+
specification,
|
|
4043
|
+
context,
|
|
4044
|
+
fieldChange
|
|
4045
|
+
}) {
|
|
4046
|
+
const env2 = getEnv();
|
|
4047
|
+
const jsonData = {
|
|
4248
4048
|
model,
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
context,
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
object ? object : {},
|
|
4263
|
-
fieldChange ? fieldChange : [],
|
|
4264
|
-
specification
|
|
4265
|
-
]
|
|
4266
|
-
};
|
|
4267
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4268
|
-
headers: {
|
|
4269
|
-
"Content-Type": "application/json"
|
|
4270
|
-
}
|
|
4271
|
-
});
|
|
4049
|
+
method: "onchange" /* ONCHANGE */,
|
|
4050
|
+
ids,
|
|
4051
|
+
with_context: context,
|
|
4052
|
+
args: [
|
|
4053
|
+
object ? object : {},
|
|
4054
|
+
fieldChange ? fieldChange : [],
|
|
4055
|
+
specification
|
|
4056
|
+
]
|
|
4057
|
+
};
|
|
4058
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4059
|
+
headers: {
|
|
4060
|
+
"Content-Type": "application/json"
|
|
4061
|
+
}
|
|
4272
4062
|
});
|
|
4273
4063
|
},
|
|
4274
|
-
getListFieldsOnchange(
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
"Content-Type": "application/json"
|
|
4285
|
-
}
|
|
4286
|
-
});
|
|
4064
|
+
async getListFieldsOnchange({ model }) {
|
|
4065
|
+
const env2 = getEnv();
|
|
4066
|
+
const jsonData = {
|
|
4067
|
+
model,
|
|
4068
|
+
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4069
|
+
};
|
|
4070
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4071
|
+
headers: {
|
|
4072
|
+
"Content-Type": "application/json"
|
|
4073
|
+
}
|
|
4287
4074
|
});
|
|
4288
4075
|
},
|
|
4289
4076
|
parseORMOdoo(data) {
|
|
@@ -4297,14 +4084,13 @@ var ModelService = {
|
|
|
4297
4084
|
data[key] = "/";
|
|
4298
4085
|
}
|
|
4299
4086
|
}
|
|
4300
|
-
return
|
|
4087
|
+
return { ...data };
|
|
4301
4088
|
},
|
|
4302
4089
|
toDataJS(data, viewData, model) {
|
|
4303
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
4304
4090
|
for (const key in data) {
|
|
4305
4091
|
if (data[key] === false) {
|
|
4306
4092
|
if (viewData && model) {
|
|
4307
|
-
if (
|
|
4093
|
+
if (viewData?.models?.[model]?.[key]?.type !== "boolean" /* BOOLEAN */) {
|
|
4308
4094
|
data[key] = null;
|
|
4309
4095
|
}
|
|
4310
4096
|
} else {
|
|
@@ -4314,13 +4100,12 @@ var ModelService = {
|
|
|
4314
4100
|
data[key] = "Draft";
|
|
4315
4101
|
} else if (data[key] !== false) {
|
|
4316
4102
|
if (model !== void 0) {
|
|
4317
|
-
if (
|
|
4318
|
-
data[key] = (
|
|
4319
|
-
|
|
4320
|
-
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;
|
|
4103
|
+
if (viewData?.models?.[model]?.[key]?.type === "one2many" /* ONE2MANY */ || viewData?.models?.[model]?.[key]?.type === "many2many" /* MANY2MANY */) {
|
|
4104
|
+
data[key] = (data[key] ??= [])?.map((item) => {
|
|
4105
|
+
const relation = viewData?.models?.[model]?.[key]?.relation;
|
|
4321
4106
|
if (relation !== void 0) {
|
|
4322
|
-
if (
|
|
4323
|
-
if (
|
|
4107
|
+
if (viewData?.models?.[relation]) {
|
|
4108
|
+
if (item?.length >= 3) {
|
|
4324
4109
|
return ModelService.toDataJS(
|
|
4325
4110
|
item[OBJECT_POSITION],
|
|
4326
4111
|
viewData,
|
|
@@ -4330,7 +4115,7 @@ var ModelService = {
|
|
|
4330
4115
|
return ModelService.toDataJS(item, viewData, relation);
|
|
4331
4116
|
}
|
|
4332
4117
|
} else {
|
|
4333
|
-
if (
|
|
4118
|
+
if (item?.length >= 3) {
|
|
4334
4119
|
return item[OBJECT_POSITION];
|
|
4335
4120
|
} else {
|
|
4336
4121
|
return item;
|
|
@@ -4342,556 +4127,514 @@ var ModelService = {
|
|
|
4342
4127
|
}
|
|
4343
4128
|
}
|
|
4344
4129
|
}
|
|
4345
|
-
return
|
|
4130
|
+
return { ...data };
|
|
4346
4131
|
}
|
|
4347
4132
|
};
|
|
4348
4133
|
var model_service_default = ModelService;
|
|
4349
4134
|
|
|
4350
4135
|
// src/services/user-service/index.ts
|
|
4351
4136
|
var UserService = {
|
|
4352
|
-
getProfile(path) {
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
}
|
|
4359
|
-
});
|
|
4137
|
+
async getProfile(path) {
|
|
4138
|
+
const env2 = getEnv();
|
|
4139
|
+
return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
|
|
4140
|
+
headers: {
|
|
4141
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
4142
|
+
}
|
|
4360
4143
|
});
|
|
4361
4144
|
},
|
|
4362
|
-
getUser(
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
display_name: {}
|
|
4388
|
-
}
|
|
4145
|
+
async getUser({ context, id }) {
|
|
4146
|
+
const env2 = getEnv();
|
|
4147
|
+
const jsonData = {
|
|
4148
|
+
model: "res.users",
|
|
4149
|
+
method: "web_read",
|
|
4150
|
+
ids: [id],
|
|
4151
|
+
with_context: context,
|
|
4152
|
+
kwargs: {
|
|
4153
|
+
specification: {
|
|
4154
|
+
display_name: {},
|
|
4155
|
+
image_1920: {},
|
|
4156
|
+
name: {},
|
|
4157
|
+
login: {},
|
|
4158
|
+
email: {},
|
|
4159
|
+
password: {},
|
|
4160
|
+
visible_group_id: {
|
|
4161
|
+
fields: {
|
|
4162
|
+
id: {},
|
|
4163
|
+
display_name: {}
|
|
4164
|
+
}
|
|
4165
|
+
},
|
|
4166
|
+
company_id: {
|
|
4167
|
+
fields: {
|
|
4168
|
+
id: {},
|
|
4169
|
+
display_name: {}
|
|
4389
4170
|
}
|
|
4390
4171
|
}
|
|
4391
4172
|
}
|
|
4392
|
-
}
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
}
|
|
4173
|
+
}
|
|
4174
|
+
};
|
|
4175
|
+
return env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4176
|
+
headers: {
|
|
4177
|
+
"Content-Type": "application/json"
|
|
4178
|
+
}
|
|
4398
4179
|
});
|
|
4399
4180
|
},
|
|
4400
|
-
switchUserLocale:
|
|
4401
|
-
var _a;
|
|
4181
|
+
switchUserLocale: async ({ id, values }) => {
|
|
4402
4182
|
const env2 = getEnv();
|
|
4403
4183
|
const jsonData = {
|
|
4404
4184
|
model: "res.users",
|
|
4405
4185
|
domain: [["id", "=", id]],
|
|
4406
4186
|
values
|
|
4407
4187
|
};
|
|
4408
|
-
return env2
|
|
4188
|
+
return env2?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
|
|
4409
4189
|
headers: {
|
|
4410
4190
|
"Content-Type": "application/json"
|
|
4411
4191
|
}
|
|
4412
4192
|
});
|
|
4413
|
-
}
|
|
4193
|
+
}
|
|
4414
4194
|
};
|
|
4415
4195
|
var user_service_default = UserService;
|
|
4416
4196
|
|
|
4417
4197
|
// src/services/view-service/index.ts
|
|
4418
4198
|
var ViewService = {
|
|
4419
|
-
getView(
|
|
4420
|
-
|
|
4199
|
+
async getView({
|
|
4200
|
+
model,
|
|
4201
|
+
views,
|
|
4202
|
+
context = {},
|
|
4203
|
+
options = {},
|
|
4204
|
+
aid
|
|
4205
|
+
}) {
|
|
4206
|
+
const env2 = getEnv();
|
|
4207
|
+
const defaultOptions = {
|
|
4208
|
+
load_filters: true,
|
|
4209
|
+
toolbar: true,
|
|
4210
|
+
action_id: aid
|
|
4211
|
+
};
|
|
4212
|
+
const jsonDataView = {
|
|
4421
4213
|
model,
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
};
|
|
4434
|
-
const jsonDataView = {
|
|
4435
|
-
model,
|
|
4436
|
-
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
4437
|
-
kwargs: {
|
|
4438
|
-
views,
|
|
4439
|
-
options: __spreadValues(__spreadValues({}, options), defaultOptions)
|
|
4440
|
-
},
|
|
4441
|
-
with_context: context
|
|
4442
|
-
};
|
|
4443
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4444
|
-
headers: {
|
|
4445
|
-
"Content-Type": "application/json"
|
|
4446
|
-
}
|
|
4447
|
-
});
|
|
4214
|
+
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
4215
|
+
kwargs: {
|
|
4216
|
+
views,
|
|
4217
|
+
options: { ...options, ...defaultOptions }
|
|
4218
|
+
},
|
|
4219
|
+
with_context: context
|
|
4220
|
+
};
|
|
4221
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
|
|
4222
|
+
headers: {
|
|
4223
|
+
"Content-Type": "application/json"
|
|
4224
|
+
}
|
|
4448
4225
|
});
|
|
4449
4226
|
},
|
|
4450
|
-
getMenu(context) {
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4227
|
+
async getMenu(context) {
|
|
4228
|
+
const env2 = getEnv();
|
|
4229
|
+
const jsonData = {
|
|
4230
|
+
model: "ir.ui.menu" /* MENU */,
|
|
4231
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4232
|
+
ids: [],
|
|
4233
|
+
with_context: context,
|
|
4234
|
+
kwargs: {
|
|
4235
|
+
specification: {
|
|
4236
|
+
active: {},
|
|
4237
|
+
name: {},
|
|
4238
|
+
is_display: {},
|
|
4239
|
+
sequence: {},
|
|
4240
|
+
complete_name: {},
|
|
4241
|
+
action: {
|
|
4242
|
+
fields: {
|
|
4243
|
+
display_name: {},
|
|
4244
|
+
type: {},
|
|
4245
|
+
binding_view_types: {}
|
|
4246
|
+
// res_model: {},
|
|
4247
|
+
}
|
|
4248
|
+
},
|
|
4249
|
+
url_icon: {},
|
|
4250
|
+
web_icon: {},
|
|
4251
|
+
web_icon_data: {},
|
|
4252
|
+
groups_id: {
|
|
4253
|
+
fields: {
|
|
4254
|
+
full_name: {}
|
|
4473
4255
|
},
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4256
|
+
limit: 40,
|
|
4257
|
+
order: ""
|
|
4258
|
+
},
|
|
4259
|
+
display_name: {},
|
|
4260
|
+
child_id: {
|
|
4261
|
+
fields: {
|
|
4262
|
+
active: {},
|
|
4263
|
+
name: {},
|
|
4264
|
+
is_display: {},
|
|
4265
|
+
sequence: {},
|
|
4266
|
+
complete_name: {},
|
|
4267
|
+
action: {
|
|
4268
|
+
fields: {
|
|
4269
|
+
display_name: {},
|
|
4270
|
+
type: {},
|
|
4271
|
+
binding_view_types: {}
|
|
4272
|
+
// res_model: {},
|
|
4273
|
+
}
|
|
4480
4274
|
},
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
active: {},
|
|
4488
|
-
name: {},
|
|
4489
|
-
is_display: {},
|
|
4490
|
-
sequence: {},
|
|
4491
|
-
complete_name: {},
|
|
4492
|
-
action: {
|
|
4493
|
-
fields: {
|
|
4494
|
-
display_name: {},
|
|
4495
|
-
type: {},
|
|
4496
|
-
binding_view_types: {}
|
|
4497
|
-
// res_model: {},
|
|
4498
|
-
}
|
|
4275
|
+
url_icon: {},
|
|
4276
|
+
web_icon: {},
|
|
4277
|
+
web_icon_data: {},
|
|
4278
|
+
groups_id: {
|
|
4279
|
+
fields: {
|
|
4280
|
+
full_name: {}
|
|
4499
4281
|
},
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4282
|
+
limit: 40,
|
|
4283
|
+
order: ""
|
|
4284
|
+
},
|
|
4285
|
+
display_name: {},
|
|
4286
|
+
child_id: {
|
|
4287
|
+
fields: {
|
|
4288
|
+
active: {},
|
|
4289
|
+
name: {},
|
|
4290
|
+
is_display: {},
|
|
4291
|
+
sequence: {},
|
|
4292
|
+
complete_name: {},
|
|
4293
|
+
action: {
|
|
4294
|
+
fields: {
|
|
4295
|
+
display_name: {},
|
|
4296
|
+
type: {},
|
|
4297
|
+
binding_view_types: {}
|
|
4298
|
+
// res_model: {},
|
|
4299
|
+
}
|
|
4506
4300
|
},
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
active: {},
|
|
4514
|
-
name: {},
|
|
4515
|
-
is_display: {},
|
|
4516
|
-
sequence: {},
|
|
4517
|
-
complete_name: {},
|
|
4518
|
-
action: {
|
|
4519
|
-
fields: {
|
|
4520
|
-
display_name: {},
|
|
4521
|
-
type: {},
|
|
4522
|
-
binding_view_types: {}
|
|
4523
|
-
// res_model: {},
|
|
4524
|
-
}
|
|
4301
|
+
url_icon: {},
|
|
4302
|
+
web_icon: {},
|
|
4303
|
+
web_icon_data: {},
|
|
4304
|
+
groups_id: {
|
|
4305
|
+
fields: {
|
|
4306
|
+
full_name: {}
|
|
4525
4307
|
},
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4308
|
+
limit: 40,
|
|
4309
|
+
order: ""
|
|
4310
|
+
},
|
|
4311
|
+
display_name: {},
|
|
4312
|
+
child_id: {
|
|
4313
|
+
fields: {
|
|
4314
|
+
active: {},
|
|
4315
|
+
name: {},
|
|
4316
|
+
is_display: {},
|
|
4317
|
+
sequence: {},
|
|
4318
|
+
complete_name: {},
|
|
4319
|
+
action: {
|
|
4320
|
+
fields: {
|
|
4321
|
+
display_name: {},
|
|
4322
|
+
type: {},
|
|
4323
|
+
binding_view_types: {}
|
|
4324
|
+
// res_model: {},
|
|
4325
|
+
}
|
|
4532
4326
|
},
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
active: {},
|
|
4540
|
-
name: {},
|
|
4541
|
-
is_display: {},
|
|
4542
|
-
sequence: {},
|
|
4543
|
-
complete_name: {},
|
|
4544
|
-
action: {
|
|
4545
|
-
fields: {
|
|
4546
|
-
display_name: {},
|
|
4547
|
-
type: {},
|
|
4548
|
-
binding_view_types: {}
|
|
4549
|
-
// res_model: {},
|
|
4550
|
-
}
|
|
4551
|
-
},
|
|
4552
|
-
url_icon: {},
|
|
4553
|
-
web_icon: {},
|
|
4554
|
-
web_icon_data: {},
|
|
4555
|
-
groups_id: {
|
|
4556
|
-
fields: {
|
|
4557
|
-
full_name: {}
|
|
4558
|
-
},
|
|
4559
|
-
limit: 40,
|
|
4560
|
-
order: ""
|
|
4327
|
+
url_icon: {},
|
|
4328
|
+
web_icon: {},
|
|
4329
|
+
web_icon_data: {},
|
|
4330
|
+
groups_id: {
|
|
4331
|
+
fields: {
|
|
4332
|
+
full_name: {}
|
|
4561
4333
|
},
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
fields: {},
|
|
4565
|
-
limit: 40,
|
|
4566
|
-
order: ""
|
|
4567
|
-
}
|
|
4334
|
+
limit: 40,
|
|
4335
|
+
order: ""
|
|
4568
4336
|
},
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
"
|
|
4593
|
-
|
|
4594
|
-
|
|
4337
|
+
display_name: {},
|
|
4338
|
+
child_id: {
|
|
4339
|
+
fields: {},
|
|
4340
|
+
limit: 40,
|
|
4341
|
+
order: ""
|
|
4342
|
+
}
|
|
4343
|
+
},
|
|
4344
|
+
limit: 40,
|
|
4345
|
+
order: ""
|
|
4346
|
+
}
|
|
4347
|
+
},
|
|
4348
|
+
limit: 40,
|
|
4349
|
+
order: ""
|
|
4350
|
+
}
|
|
4351
|
+
},
|
|
4352
|
+
limit: 40,
|
|
4353
|
+
order: ""
|
|
4354
|
+
}
|
|
4355
|
+
},
|
|
4356
|
+
domain: [
|
|
4357
|
+
"&",
|
|
4358
|
+
["is_display", "=", true],
|
|
4359
|
+
"&",
|
|
4360
|
+
["active", "=", true],
|
|
4361
|
+
["parent_id", "=", false]
|
|
4362
|
+
]
|
|
4363
|
+
}
|
|
4364
|
+
};
|
|
4365
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4366
|
+
headers: {
|
|
4367
|
+
"Content-Type": "application/json"
|
|
4368
|
+
}
|
|
4595
4369
|
});
|
|
4596
4370
|
},
|
|
4597
|
-
getActionDetail(aid, context) {
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
groups_id: {},
|
|
4617
|
-
search_view_id: {}
|
|
4618
|
-
}
|
|
4619
|
-
}
|
|
4620
|
-
};
|
|
4621
|
-
return (_a = env2 == null ? void 0 : env2.requests) == null ? void 0 : _a.post("/call" /* CALL_PATH */, jsonData, {
|
|
4622
|
-
headers: {
|
|
4623
|
-
"Content-Type": "application/json"
|
|
4371
|
+
async getActionDetail(aid, context) {
|
|
4372
|
+
const env2 = getEnv();
|
|
4373
|
+
const jsonData = {
|
|
4374
|
+
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
4375
|
+
method: "web_read" /* WEB_READ */,
|
|
4376
|
+
ids: [aid],
|
|
4377
|
+
with_context: context,
|
|
4378
|
+
kwargs: {
|
|
4379
|
+
specification: {
|
|
4380
|
+
id: {},
|
|
4381
|
+
name: {},
|
|
4382
|
+
res_model: {},
|
|
4383
|
+
views: {},
|
|
4384
|
+
view_mode: {},
|
|
4385
|
+
mobile_view_mode: {},
|
|
4386
|
+
domain: {},
|
|
4387
|
+
context: {},
|
|
4388
|
+
groups_id: {},
|
|
4389
|
+
search_view_id: {}
|
|
4624
4390
|
}
|
|
4625
|
-
}
|
|
4391
|
+
}
|
|
4392
|
+
};
|
|
4393
|
+
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4394
|
+
headers: {
|
|
4395
|
+
"Content-Type": "application/json"
|
|
4396
|
+
}
|
|
4626
4397
|
});
|
|
4627
4398
|
},
|
|
4628
|
-
getResequence(
|
|
4629
|
-
|
|
4399
|
+
async getResequence({
|
|
4400
|
+
model,
|
|
4401
|
+
ids,
|
|
4402
|
+
context,
|
|
4403
|
+
offset
|
|
4404
|
+
}) {
|
|
4405
|
+
const env2 = getEnv();
|
|
4406
|
+
const jsonData = {
|
|
4630
4407
|
model,
|
|
4408
|
+
with_context: context,
|
|
4631
4409
|
ids,
|
|
4632
|
-
|
|
4633
|
-
offset
|
|
4634
|
-
}
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
ids,
|
|
4640
|
-
field: "sequence"
|
|
4641
|
-
}, offset > 0 ? { offset } : {});
|
|
4642
|
-
return env2 == null ? void 0 : env2.requests.post("/web/dataset/resequence", jsonData, {
|
|
4643
|
-
headers: {
|
|
4644
|
-
"Content-Type": "application/json"
|
|
4645
|
-
}
|
|
4646
|
-
});
|
|
4647
|
-
});
|
|
4648
|
-
},
|
|
4649
|
-
getSelectionItem(_0) {
|
|
4650
|
-
return __async(this, arguments, function* ({ data }) {
|
|
4651
|
-
var _a;
|
|
4652
|
-
const env2 = getEnv();
|
|
4653
|
-
const jsonData = {
|
|
4654
|
-
model: data.model,
|
|
4655
|
-
ids: [],
|
|
4656
|
-
method: "get_data_select",
|
|
4657
|
-
with_context: data.context,
|
|
4658
|
-
kwargs: {
|
|
4659
|
-
count_limit: 10001,
|
|
4660
|
-
domain: data.domain ? data.domain : [],
|
|
4661
|
-
offset: 0,
|
|
4662
|
-
order: "",
|
|
4663
|
-
specification: (_a = data == null ? void 0 : data.specification) != null ? _a : {
|
|
4664
|
-
id: {},
|
|
4665
|
-
name: {},
|
|
4666
|
-
display_name: {}
|
|
4667
|
-
}
|
|
4668
|
-
}
|
|
4669
|
-
};
|
|
4670
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4671
|
-
headers: {
|
|
4672
|
-
"Content-Type": "application/json"
|
|
4673
|
-
}
|
|
4674
|
-
});
|
|
4410
|
+
field: "sequence",
|
|
4411
|
+
...offset > 0 ? { offset } : {}
|
|
4412
|
+
};
|
|
4413
|
+
return env2?.requests.post("/web/dataset/resequence", jsonData, {
|
|
4414
|
+
headers: {
|
|
4415
|
+
"Content-Type": "application/json"
|
|
4416
|
+
}
|
|
4675
4417
|
});
|
|
4676
4418
|
},
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4419
|
+
async getSelectionItem({ data }) {
|
|
4420
|
+
const env2 = getEnv();
|
|
4421
|
+
const jsonData = {
|
|
4422
|
+
model: data.model,
|
|
4423
|
+
ids: [],
|
|
4424
|
+
method: "get_data_select",
|
|
4425
|
+
with_context: data.context,
|
|
4426
|
+
kwargs: {
|
|
4427
|
+
count_limit: 10001,
|
|
4428
|
+
domain: data.domain ? data.domain : [],
|
|
4429
|
+
offset: 0,
|
|
4430
|
+
order: "",
|
|
4431
|
+
specification: data?.specification ?? {
|
|
4432
|
+
id: {},
|
|
4433
|
+
name: {},
|
|
4434
|
+
display_name: {}
|
|
4687
4435
|
}
|
|
4688
|
-
|
|
4436
|
+
}
|
|
4437
|
+
};
|
|
4438
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4439
|
+
headers: {
|
|
4440
|
+
"Content-Type": "application/json"
|
|
4441
|
+
}
|
|
4689
4442
|
});
|
|
4690
4443
|
},
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4444
|
+
async loadMessages() {
|
|
4445
|
+
const env2 = getEnv();
|
|
4446
|
+
return env2.requests.post(
|
|
4447
|
+
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
4448
|
+
{},
|
|
4449
|
+
{
|
|
4697
4450
|
headers: {
|
|
4698
4451
|
"Content-Type": "application/json"
|
|
4699
4452
|
}
|
|
4700
|
-
}
|
|
4453
|
+
}
|
|
4454
|
+
);
|
|
4455
|
+
},
|
|
4456
|
+
async getVersion() {
|
|
4457
|
+
const env2 = getEnv();
|
|
4458
|
+
return env2?.requests.get("", {
|
|
4459
|
+
headers: {
|
|
4460
|
+
"Content-Type": "application/json"
|
|
4461
|
+
}
|
|
4701
4462
|
});
|
|
4702
4463
|
},
|
|
4703
|
-
get2FAMethods(
|
|
4704
|
-
|
|
4464
|
+
async get2FAMethods({
|
|
4465
|
+
method,
|
|
4466
|
+
with_context
|
|
4467
|
+
}) {
|
|
4468
|
+
const env2 = getEnv();
|
|
4469
|
+
const jsonData = {
|
|
4705
4470
|
method,
|
|
4706
4471
|
with_context
|
|
4707
|
-
}
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
};
|
|
4713
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4714
|
-
headers: {
|
|
4715
|
-
"Content-Type": "application/json"
|
|
4716
|
-
}
|
|
4717
|
-
});
|
|
4472
|
+
};
|
|
4473
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4474
|
+
headers: {
|
|
4475
|
+
"Content-Type": "application/json"
|
|
4476
|
+
}
|
|
4718
4477
|
});
|
|
4719
4478
|
},
|
|
4720
|
-
verify2FA(
|
|
4721
|
-
|
|
4479
|
+
async verify2FA({
|
|
4480
|
+
method,
|
|
4481
|
+
with_context,
|
|
4482
|
+
code,
|
|
4483
|
+
device,
|
|
4484
|
+
location
|
|
4485
|
+
}) {
|
|
4486
|
+
const env2 = getEnv();
|
|
4487
|
+
const jsonData = {
|
|
4722
4488
|
method,
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
},
|
|
4738
|
-
with_context
|
|
4739
|
-
};
|
|
4740
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4741
|
-
headers: {
|
|
4742
|
-
"Content-Type": "application/json"
|
|
4743
|
-
},
|
|
4744
|
-
withCredentials: true
|
|
4745
|
-
});
|
|
4489
|
+
kwargs: {
|
|
4490
|
+
vals: {
|
|
4491
|
+
code,
|
|
4492
|
+
device,
|
|
4493
|
+
location
|
|
4494
|
+
}
|
|
4495
|
+
},
|
|
4496
|
+
with_context
|
|
4497
|
+
};
|
|
4498
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4499
|
+
headers: {
|
|
4500
|
+
"Content-Type": "application/json"
|
|
4501
|
+
},
|
|
4502
|
+
withCredentials: true
|
|
4746
4503
|
});
|
|
4747
4504
|
},
|
|
4748
|
-
signInSSO(
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4505
|
+
async signInSSO({
|
|
4506
|
+
redirect_uri,
|
|
4507
|
+
state,
|
|
4508
|
+
client_id,
|
|
4509
|
+
response_type,
|
|
4510
|
+
path
|
|
4511
|
+
}) {
|
|
4512
|
+
const env2 = getEnv();
|
|
4513
|
+
const params = new URLSearchParams({
|
|
4753
4514
|
response_type,
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
}
|
|
4763
|
-
|
|
4764
|
-
return env2 == null ? void 0 : env2.requests.get(url, {
|
|
4765
|
-
headers: {
|
|
4766
|
-
"Content-Type": "application/json"
|
|
4767
|
-
},
|
|
4768
|
-
withCredentials: true
|
|
4769
|
-
});
|
|
4515
|
+
client_id,
|
|
4516
|
+
redirect_uri,
|
|
4517
|
+
state
|
|
4518
|
+
});
|
|
4519
|
+
const url = `${path}?${params.toString()}`;
|
|
4520
|
+
return env2?.requests.get(url, {
|
|
4521
|
+
headers: {
|
|
4522
|
+
"Content-Type": "application/json"
|
|
4523
|
+
},
|
|
4524
|
+
withCredentials: true
|
|
4770
4525
|
});
|
|
4771
4526
|
},
|
|
4772
|
-
grantAccess(
|
|
4773
|
-
|
|
4527
|
+
async grantAccess({
|
|
4528
|
+
redirect_uri,
|
|
4529
|
+
state,
|
|
4530
|
+
client_id,
|
|
4531
|
+
scopes
|
|
4532
|
+
}) {
|
|
4533
|
+
const env2 = getEnv();
|
|
4534
|
+
const jsonData = {
|
|
4774
4535
|
redirect_uri,
|
|
4775
4536
|
state,
|
|
4776
4537
|
client_id,
|
|
4777
4538
|
scopes
|
|
4778
|
-
}
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
scopes
|
|
4785
|
-
};
|
|
4786
|
-
return env2 == null ? void 0 : env2.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
|
|
4787
|
-
headers: {
|
|
4788
|
-
"Content-Type": "application/json"
|
|
4789
|
-
},
|
|
4790
|
-
withCredentials: true
|
|
4791
|
-
});
|
|
4539
|
+
};
|
|
4540
|
+
return env2?.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
|
|
4541
|
+
headers: {
|
|
4542
|
+
"Content-Type": "application/json"
|
|
4543
|
+
},
|
|
4544
|
+
withCredentials: true
|
|
4792
4545
|
});
|
|
4793
4546
|
},
|
|
4794
|
-
getFieldsViewSecurity(
|
|
4795
|
-
|
|
4547
|
+
async getFieldsViewSecurity({
|
|
4548
|
+
method,
|
|
4549
|
+
token,
|
|
4550
|
+
views
|
|
4551
|
+
}) {
|
|
4552
|
+
const env2 = getEnv();
|
|
4553
|
+
const jsonData = {
|
|
4796
4554
|
method,
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
}
|
|
4809
|
-
};
|
|
4810
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4811
|
-
headers: {
|
|
4812
|
-
"Content-Type": "application/json"
|
|
4813
|
-
}
|
|
4814
|
-
});
|
|
4555
|
+
kwargs: {
|
|
4556
|
+
views
|
|
4557
|
+
},
|
|
4558
|
+
with_context: {
|
|
4559
|
+
token
|
|
4560
|
+
}
|
|
4561
|
+
};
|
|
4562
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4563
|
+
headers: {
|
|
4564
|
+
"Content-Type": "application/json"
|
|
4565
|
+
}
|
|
4815
4566
|
});
|
|
4816
4567
|
},
|
|
4817
|
-
settingsWebRead2fa(
|
|
4818
|
-
|
|
4568
|
+
async settingsWebRead2fa({
|
|
4569
|
+
method,
|
|
4570
|
+
model,
|
|
4571
|
+
kwargs,
|
|
4572
|
+
token
|
|
4573
|
+
}) {
|
|
4574
|
+
const env2 = getEnv();
|
|
4575
|
+
const jsonData = {
|
|
4819
4576
|
method,
|
|
4820
4577
|
model,
|
|
4821
4578
|
kwargs,
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
token
|
|
4831
|
-
}
|
|
4832
|
-
};
|
|
4833
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4834
|
-
headers: {
|
|
4835
|
-
"Content-Type": "application/json"
|
|
4836
|
-
}
|
|
4837
|
-
});
|
|
4579
|
+
with_context: {
|
|
4580
|
+
token
|
|
4581
|
+
}
|
|
4582
|
+
};
|
|
4583
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4584
|
+
headers: {
|
|
4585
|
+
"Content-Type": "application/json"
|
|
4586
|
+
}
|
|
4838
4587
|
});
|
|
4839
4588
|
},
|
|
4840
|
-
requestSetupTotp(
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
}
|
|
4853
|
-
});
|
|
4589
|
+
async requestSetupTotp({ method, token }) {
|
|
4590
|
+
const env2 = getEnv();
|
|
4591
|
+
const jsonData = {
|
|
4592
|
+
method,
|
|
4593
|
+
with_context: {
|
|
4594
|
+
token
|
|
4595
|
+
}
|
|
4596
|
+
};
|
|
4597
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4598
|
+
headers: {
|
|
4599
|
+
"Content-Type": "application/json"
|
|
4600
|
+
}
|
|
4854
4601
|
});
|
|
4855
4602
|
},
|
|
4856
|
-
verifyTotp(
|
|
4857
|
-
|
|
4603
|
+
async verifyTotp({
|
|
4604
|
+
method,
|
|
4605
|
+
action_token,
|
|
4606
|
+
code
|
|
4607
|
+
}) {
|
|
4608
|
+
const env2 = getEnv();
|
|
4609
|
+
const jsonData = {
|
|
4858
4610
|
method,
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
const env2 = getEnv();
|
|
4863
|
-
const jsonData = {
|
|
4864
|
-
method,
|
|
4865
|
-
kwargs: {
|
|
4866
|
-
vals: {
|
|
4867
|
-
code
|
|
4868
|
-
}
|
|
4869
|
-
},
|
|
4870
|
-
with_context: {
|
|
4871
|
-
action_token
|
|
4872
|
-
}
|
|
4873
|
-
};
|
|
4874
|
-
return env2 == null ? void 0 : env2.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4875
|
-
headers: {
|
|
4876
|
-
"Content-Type": "application/json"
|
|
4611
|
+
kwargs: {
|
|
4612
|
+
vals: {
|
|
4613
|
+
code
|
|
4877
4614
|
}
|
|
4878
|
-
}
|
|
4615
|
+
},
|
|
4616
|
+
with_context: {
|
|
4617
|
+
action_token
|
|
4618
|
+
}
|
|
4619
|
+
};
|
|
4620
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4621
|
+
headers: {
|
|
4622
|
+
"Content-Type": "application/json"
|
|
4623
|
+
}
|
|
4879
4624
|
});
|
|
4880
4625
|
},
|
|
4881
|
-
removeTotpSetUp(
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
}
|
|
4894
|
-
});
|
|
4626
|
+
async removeTotpSetUp({ method, token }) {
|
|
4627
|
+
const env2 = getEnv();
|
|
4628
|
+
const jsonData = {
|
|
4629
|
+
method,
|
|
4630
|
+
with_context: {
|
|
4631
|
+
token
|
|
4632
|
+
}
|
|
4633
|
+
};
|
|
4634
|
+
return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
4635
|
+
headers: {
|
|
4636
|
+
"Content-Type": "application/json"
|
|
4637
|
+
}
|
|
4895
4638
|
});
|
|
4896
4639
|
}
|
|
4897
4640
|
};
|
|
@@ -4899,7 +4642,7 @@ var view_service_default = ViewService;
|
|
|
4899
4642
|
|
|
4900
4643
|
// src/hooks/auth/use-forgot-password.ts
|
|
4901
4644
|
var useForgotPassword = () => {
|
|
4902
|
-
return
|
|
4645
|
+
return useMutation({
|
|
4903
4646
|
mutationFn: (email) => {
|
|
4904
4647
|
return auth_service_default.forgotPassword(email);
|
|
4905
4648
|
}
|
|
@@ -4908,9 +4651,9 @@ var useForgotPassword = () => {
|
|
|
4908
4651
|
var use_forgot_password_default = useForgotPassword;
|
|
4909
4652
|
|
|
4910
4653
|
// src/hooks/auth/use-forgotpassword-sso.ts
|
|
4911
|
-
|
|
4654
|
+
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
|
4912
4655
|
var useForgotPasswordSSO = () => {
|
|
4913
|
-
return (
|
|
4656
|
+
return useMutation2({
|
|
4914
4657
|
mutationFn: ({
|
|
4915
4658
|
email,
|
|
4916
4659
|
with_context,
|
|
@@ -4923,20 +4666,20 @@ var useForgotPasswordSSO = () => {
|
|
|
4923
4666
|
var use_forgotpassword_sso_default = useForgotPasswordSSO;
|
|
4924
4667
|
|
|
4925
4668
|
// src/hooks/auth/use-get-provider.ts
|
|
4926
|
-
|
|
4669
|
+
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
|
4927
4670
|
var useGetProvider = () => {
|
|
4928
|
-
return (
|
|
4671
|
+
return useMutation3({
|
|
4929
4672
|
mutationFn: (data) => {
|
|
4930
|
-
return auth_service_default.getProviders(data
|
|
4673
|
+
return auth_service_default.getProviders(data?.db);
|
|
4931
4674
|
}
|
|
4932
4675
|
});
|
|
4933
4676
|
};
|
|
4934
4677
|
var use_get_provider_default = useGetProvider;
|
|
4935
4678
|
|
|
4936
4679
|
// src/hooks/auth/use-isvalid-token.ts
|
|
4937
|
-
|
|
4680
|
+
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
|
4938
4681
|
var useIsValidToken = () => {
|
|
4939
|
-
return (
|
|
4682
|
+
return useMutation4({
|
|
4940
4683
|
mutationFn: (token) => {
|
|
4941
4684
|
return auth_service_default.isValidToken(token);
|
|
4942
4685
|
}
|
|
@@ -4945,9 +4688,9 @@ var useIsValidToken = () => {
|
|
|
4945
4688
|
var use_isvalid_token_default = useIsValidToken;
|
|
4946
4689
|
|
|
4947
4690
|
// src/hooks/auth/use-login-credential.ts
|
|
4948
|
-
|
|
4691
|
+
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
4949
4692
|
var useLoginCredential = () => {
|
|
4950
|
-
return (
|
|
4693
|
+
return useMutation5({
|
|
4951
4694
|
mutationFn: (data) => {
|
|
4952
4695
|
return auth_service_default.login(data);
|
|
4953
4696
|
}
|
|
@@ -4956,9 +4699,9 @@ var useLoginCredential = () => {
|
|
|
4956
4699
|
var use_login_credential_default = useLoginCredential;
|
|
4957
4700
|
|
|
4958
4701
|
// src/hooks/auth/use-login-socical.ts
|
|
4959
|
-
|
|
4702
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
4960
4703
|
var useLoginSocial = () => {
|
|
4961
|
-
return (
|
|
4704
|
+
return useMutation6({
|
|
4962
4705
|
mutationFn: (data) => {
|
|
4963
4706
|
return auth_service_default.loginSocial(data);
|
|
4964
4707
|
}
|
|
@@ -4967,9 +4710,9 @@ var useLoginSocial = () => {
|
|
|
4967
4710
|
var use_login_socical_default = useLoginSocial;
|
|
4968
4711
|
|
|
4969
4712
|
// src/hooks/auth/use-reset-password.ts
|
|
4970
|
-
|
|
4713
|
+
import { useMutation as useMutation7 } from "@tanstack/react-query";
|
|
4971
4714
|
var useResetPassword = () => {
|
|
4972
|
-
return (
|
|
4715
|
+
return useMutation7({
|
|
4973
4716
|
mutationFn: (request) => {
|
|
4974
4717
|
return auth_service_default.resetPassword(request.data, request.token);
|
|
4975
4718
|
}
|
|
@@ -4978,9 +4721,9 @@ var useResetPassword = () => {
|
|
|
4978
4721
|
var use_reset_password_default = useResetPassword;
|
|
4979
4722
|
|
|
4980
4723
|
// src/hooks/auth/use-reset-password-sso.ts
|
|
4981
|
-
|
|
4724
|
+
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
4982
4725
|
var useResetPasswordSSO = () => {
|
|
4983
|
-
return (
|
|
4726
|
+
return useMutation8({
|
|
4984
4727
|
mutationFn: ({
|
|
4985
4728
|
method,
|
|
4986
4729
|
password,
|
|
@@ -4997,9 +4740,9 @@ var useResetPasswordSSO = () => {
|
|
|
4997
4740
|
var use_reset_password_sso_default = useResetPasswordSSO;
|
|
4998
4741
|
|
|
4999
4742
|
// src/hooks/auth/use-update-password.ts
|
|
5000
|
-
|
|
4743
|
+
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
5001
4744
|
var useUpdatePassword = () => {
|
|
5002
|
-
return (
|
|
4745
|
+
return useMutation9({
|
|
5003
4746
|
mutationFn: (request) => {
|
|
5004
4747
|
return auth_service_default.updatePassword(request.data, request.token);
|
|
5005
4748
|
}
|
|
@@ -5008,9 +4751,9 @@ var useUpdatePassword = () => {
|
|
|
5008
4751
|
var use_update_password_default = useUpdatePassword;
|
|
5009
4752
|
|
|
5010
4753
|
// src/hooks/auth/use-logout.ts
|
|
5011
|
-
|
|
4754
|
+
import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
5012
4755
|
var useLogout = () => {
|
|
5013
|
-
return (
|
|
4756
|
+
return useMutation10({
|
|
5014
4757
|
mutationFn: (data) => {
|
|
5015
4758
|
return auth_service_default.logout(data);
|
|
5016
4759
|
}
|
|
@@ -5019,9 +4762,9 @@ var useLogout = () => {
|
|
|
5019
4762
|
var use_logout_default = useLogout;
|
|
5020
4763
|
|
|
5021
4764
|
// src/hooks/auth/use-get-access-by-code.ts
|
|
5022
|
-
|
|
4765
|
+
import { useMutation as useMutation11 } from "@tanstack/react-query";
|
|
5023
4766
|
var useGetAccessByCode = () => {
|
|
5024
|
-
return (
|
|
4767
|
+
return useMutation11({
|
|
5025
4768
|
mutationFn: ({ code }) => {
|
|
5026
4769
|
return auth_service_default.getAccessByCode(code);
|
|
5027
4770
|
}
|
|
@@ -5029,26 +4772,40 @@ var useGetAccessByCode = () => {
|
|
|
5029
4772
|
};
|
|
5030
4773
|
var use_get_access_by_code_default = useGetAccessByCode;
|
|
5031
4774
|
|
|
4775
|
+
// src/hooks/auth/use-validate-action-token.ts
|
|
4776
|
+
import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
4777
|
+
var useValidateActionToken = () => {
|
|
4778
|
+
return useMutation12({
|
|
4779
|
+
mutationFn: ({
|
|
4780
|
+
actionToken,
|
|
4781
|
+
path
|
|
4782
|
+
}) => {
|
|
4783
|
+
return auth_service_default.isValidActionToken(actionToken, path);
|
|
4784
|
+
}
|
|
4785
|
+
});
|
|
4786
|
+
};
|
|
4787
|
+
var use_validate_action_token_default = useValidateActionToken;
|
|
4788
|
+
|
|
5032
4789
|
// src/hooks/company/use-get-company-info.ts
|
|
5033
|
-
|
|
4790
|
+
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
5034
4791
|
var useGetCompanyInfo = () => {
|
|
5035
|
-
return (
|
|
4792
|
+
return useMutation13({
|
|
5036
4793
|
mutationFn: (id) => company_service_default.getInfoCompany(id)
|
|
5037
4794
|
});
|
|
5038
4795
|
};
|
|
5039
4796
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5040
4797
|
|
|
5041
4798
|
// src/hooks/company/use-get-current-company.ts
|
|
5042
|
-
|
|
4799
|
+
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
5043
4800
|
var useGetCurrentCompany = () => {
|
|
5044
|
-
return (
|
|
4801
|
+
return useMutation14({
|
|
5045
4802
|
mutationFn: () => company_service_default.getCurrentCompany()
|
|
5046
4803
|
});
|
|
5047
4804
|
};
|
|
5048
4805
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
5049
4806
|
|
|
5050
4807
|
// src/hooks/company/use-get-list-company.ts
|
|
5051
|
-
|
|
4808
|
+
import { useQuery } from "@tanstack/react-query";
|
|
5052
4809
|
var useGetListCompany = (companyIDs = []) => {
|
|
5053
4810
|
const companySpec = {
|
|
5054
4811
|
id: {},
|
|
@@ -5059,7 +4816,7 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
5059
4816
|
ids: companyIDs,
|
|
5060
4817
|
specification: companySpec
|
|
5061
4818
|
};
|
|
5062
|
-
return
|
|
4819
|
+
return useQuery({
|
|
5063
4820
|
queryKey: ["list_company" /* LIST_COMPANY */, companyIDs],
|
|
5064
4821
|
queryFn: () => model_service_default.getList(getListParams),
|
|
5065
4822
|
refetchOnWindowFocus: false
|
|
@@ -5068,9 +4825,9 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
5068
4825
|
var use_get_list_company_default = useGetListCompany;
|
|
5069
4826
|
|
|
5070
4827
|
// src/hooks/excel/use-export-excel.ts
|
|
5071
|
-
|
|
4828
|
+
import { useMutation as useMutation15 } from "@tanstack/react-query";
|
|
5072
4829
|
var useExportExcel = () => {
|
|
5073
|
-
return (
|
|
4830
|
+
return useMutation15({
|
|
5074
4831
|
mutationFn: ({
|
|
5075
4832
|
model,
|
|
5076
4833
|
domain,
|
|
@@ -5095,9 +4852,9 @@ var useExportExcel = () => {
|
|
|
5095
4852
|
var use_export_excel_default = useExportExcel;
|
|
5096
4853
|
|
|
5097
4854
|
// src/hooks/excel/use-get-field-export.ts
|
|
5098
|
-
|
|
4855
|
+
import { useMutation as useMutation16 } from "@tanstack/react-query";
|
|
5099
4856
|
var useGetFieldExport = () => {
|
|
5100
|
-
return (
|
|
4857
|
+
return useMutation16({
|
|
5101
4858
|
mutationFn: ({
|
|
5102
4859
|
ids,
|
|
5103
4860
|
model,
|
|
@@ -5126,9 +4883,9 @@ var useGetFieldExport = () => {
|
|
|
5126
4883
|
var use_get_field_export_default = useGetFieldExport;
|
|
5127
4884
|
|
|
5128
4885
|
// src/hooks/excel/use-get-file-excel.ts
|
|
5129
|
-
|
|
4886
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
5130
4887
|
var useGetFileExcel = ({ model }) => {
|
|
5131
|
-
return (
|
|
4888
|
+
return useQuery2({
|
|
5132
4889
|
queryKey: [],
|
|
5133
4890
|
queryFn: () => excel_service_default.getFileExcel({
|
|
5134
4891
|
model
|
|
@@ -5144,9 +4901,9 @@ var useGetFileExcel = ({ model }) => {
|
|
|
5144
4901
|
var use_get_file_excel_default = useGetFileExcel;
|
|
5145
4902
|
|
|
5146
4903
|
// src/hooks/excel/use-parse-preview.ts
|
|
5147
|
-
|
|
4904
|
+
import { useMutation as useMutation17 } from "@tanstack/react-query";
|
|
5148
4905
|
var useParsePreview = () => {
|
|
5149
|
-
return (
|
|
4906
|
+
return useMutation17({
|
|
5150
4907
|
mutationFn: ({
|
|
5151
4908
|
id,
|
|
5152
4909
|
selectedSheet,
|
|
@@ -5163,9 +4920,9 @@ var useParsePreview = () => {
|
|
|
5163
4920
|
var use_parse_preview_default = useParsePreview;
|
|
5164
4921
|
|
|
5165
4922
|
// src/hooks/excel/use-upload-file.ts
|
|
5166
|
-
|
|
4923
|
+
import { useMutation as useMutation18 } from "@tanstack/react-query";
|
|
5167
4924
|
var useUploadFile = () => {
|
|
5168
|
-
return (
|
|
4925
|
+
return useMutation18({
|
|
5169
4926
|
mutationFn: ({ formData }) => excel_service_default.uploadFile({
|
|
5170
4927
|
formData
|
|
5171
4928
|
})
|
|
@@ -5174,9 +4931,9 @@ var useUploadFile = () => {
|
|
|
5174
4931
|
var use_upload_file_default = useUploadFile;
|
|
5175
4932
|
|
|
5176
4933
|
// src/hooks/excel/use-upload-id-file.ts
|
|
5177
|
-
|
|
4934
|
+
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
5178
4935
|
var useUploadIdFile = () => {
|
|
5179
|
-
return (
|
|
4936
|
+
return useMutation19({
|
|
5180
4937
|
mutationFn: ({ formData }) => excel_service_default.uploadIdFile({
|
|
5181
4938
|
formData
|
|
5182
4939
|
})
|
|
@@ -5185,9 +4942,9 @@ var useUploadIdFile = () => {
|
|
|
5185
4942
|
var use_upload_id_file_default = useUploadIdFile;
|
|
5186
4943
|
|
|
5187
4944
|
// src/hooks/excel/uss-execute-import.ts
|
|
5188
|
-
|
|
4945
|
+
import { useMutation as useMutation20 } from "@tanstack/react-query";
|
|
5189
4946
|
var useExecuteImport = () => {
|
|
5190
|
-
return (
|
|
4947
|
+
return useMutation20({
|
|
5191
4948
|
mutationFn: ({
|
|
5192
4949
|
fields,
|
|
5193
4950
|
columns,
|
|
@@ -5208,9 +4965,9 @@ var useExecuteImport = () => {
|
|
|
5208
4965
|
var uss_execute_import_default = useExecuteImport;
|
|
5209
4966
|
|
|
5210
4967
|
// src/hooks/form/use-change-status.ts
|
|
5211
|
-
|
|
4968
|
+
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
5212
4969
|
var useChangeStatus = () => {
|
|
5213
|
-
return (
|
|
4970
|
+
return useMutation21({
|
|
5214
4971
|
mutationFn: ({ data }) => {
|
|
5215
4972
|
return form_service_default.changeStatus({
|
|
5216
4973
|
data
|
|
@@ -5221,9 +4978,9 @@ var useChangeStatus = () => {
|
|
|
5221
4978
|
var use_change_status_default = useChangeStatus;
|
|
5222
4979
|
|
|
5223
4980
|
// src/hooks/form/use-delete-comment.ts
|
|
5224
|
-
|
|
4981
|
+
import { useMutation as useMutation22 } from "@tanstack/react-query";
|
|
5225
4982
|
var useDeleteComment = () => {
|
|
5226
|
-
return (
|
|
4983
|
+
return useMutation22({
|
|
5227
4984
|
mutationFn: ({ data }) => form_service_default.deleteComment({
|
|
5228
4985
|
data
|
|
5229
4986
|
})
|
|
@@ -5232,9 +4989,9 @@ var useDeleteComment = () => {
|
|
|
5232
4989
|
var use_delete_comment_default = useDeleteComment;
|
|
5233
4990
|
|
|
5234
4991
|
// src/hooks/form/use-get-comment.ts
|
|
5235
|
-
|
|
4992
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
5236
4993
|
var useGetComment = ({ data, queryKey }) => {
|
|
5237
|
-
return (
|
|
4994
|
+
return useQuery3({
|
|
5238
4995
|
queryKey,
|
|
5239
4996
|
queryFn: () => form_service_default.getComment({ data }).then((res) => {
|
|
5240
4997
|
if (res) {
|
|
@@ -5248,13 +5005,13 @@ var useGetComment = ({ data, queryKey }) => {
|
|
|
5248
5005
|
var use_get_comment_default = useGetComment;
|
|
5249
5006
|
|
|
5250
5007
|
// src/hooks/form/use-get-form-view.ts
|
|
5251
|
-
|
|
5008
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
5252
5009
|
var useGetFormView = ({
|
|
5253
5010
|
data,
|
|
5254
5011
|
queryKey,
|
|
5255
5012
|
enabled
|
|
5256
5013
|
}) => {
|
|
5257
|
-
return (
|
|
5014
|
+
return useQuery4({
|
|
5258
5015
|
queryKey,
|
|
5259
5016
|
queryFn: () => form_service_default.getFormView({ data }).then((res) => {
|
|
5260
5017
|
if (res) {
|
|
@@ -5268,13 +5025,13 @@ var useGetFormView = ({
|
|
|
5268
5025
|
var use_get_form_view_default = useGetFormView;
|
|
5269
5026
|
|
|
5270
5027
|
// src/hooks/form/use-get-image.ts
|
|
5271
|
-
|
|
5028
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
5272
5029
|
var useGetImage = ({
|
|
5273
5030
|
data,
|
|
5274
5031
|
queryKey,
|
|
5275
5032
|
src
|
|
5276
5033
|
}) => {
|
|
5277
|
-
return (
|
|
5034
|
+
return useQuery5({
|
|
5278
5035
|
queryKey,
|
|
5279
5036
|
queryFn: () => form_service_default.getImage({ data }).then((res) => {
|
|
5280
5037
|
if (res) {
|
|
@@ -5288,9 +5045,9 @@ var useGetImage = ({
|
|
|
5288
5045
|
var use_get_image_default = useGetImage;
|
|
5289
5046
|
|
|
5290
5047
|
// src/hooks/form/use-send-comment.ts
|
|
5291
|
-
|
|
5048
|
+
import { useMutation as useMutation23 } from "@tanstack/react-query";
|
|
5292
5049
|
var useSendComment = () => {
|
|
5293
|
-
return (
|
|
5050
|
+
return useMutation23({
|
|
5294
5051
|
mutationFn: ({ data }) => form_service_default.sentComment({
|
|
5295
5052
|
data
|
|
5296
5053
|
})
|
|
@@ -5299,9 +5056,9 @@ var useSendComment = () => {
|
|
|
5299
5056
|
var use_send_comment_default = useSendComment;
|
|
5300
5057
|
|
|
5301
5058
|
// src/hooks/form/use-upload-image.ts
|
|
5302
|
-
|
|
5059
|
+
import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
5303
5060
|
var useUploadImage = () => {
|
|
5304
|
-
return (
|
|
5061
|
+
return useMutation24({
|
|
5305
5062
|
mutationFn: ({ data }) => form_service_default.uploadImage({
|
|
5306
5063
|
data
|
|
5307
5064
|
})
|
|
@@ -5310,18 +5067,18 @@ var useUploadImage = () => {
|
|
|
5310
5067
|
var use_upload_image_default = useUploadImage;
|
|
5311
5068
|
|
|
5312
5069
|
// src/hooks/model/use-delete.ts
|
|
5313
|
-
|
|
5070
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
5314
5071
|
var useDelete = () => {
|
|
5315
|
-
return (
|
|
5072
|
+
return useMutation25({
|
|
5316
5073
|
mutationFn: ({ ids, model }) => model_service_default.delete({ ids, model })
|
|
5317
5074
|
});
|
|
5318
5075
|
};
|
|
5319
5076
|
var use_delete_default = useDelete;
|
|
5320
5077
|
|
|
5321
5078
|
// src/hooks/model/use-get-all.ts
|
|
5322
|
-
|
|
5079
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
5323
5080
|
var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
5324
|
-
return (
|
|
5081
|
+
return useQuery6({
|
|
5325
5082
|
queryKey,
|
|
5326
5083
|
queryFn: () => model_service_default.getAll({ data }).then((res) => {
|
|
5327
5084
|
if (res) {
|
|
@@ -5336,9 +5093,9 @@ var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
|
5336
5093
|
var use_get_all_default = useGetAll;
|
|
5337
5094
|
|
|
5338
5095
|
// src/hooks/model/use-get-conversion-rate.ts
|
|
5339
|
-
|
|
5096
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
5340
5097
|
var useGetConversionRate = () => {
|
|
5341
|
-
return (
|
|
5098
|
+
return useQuery7({
|
|
5342
5099
|
queryKey: ["currency-rate"],
|
|
5343
5100
|
queryFn: () => model_service_default.getConversionRate().then((res) => {
|
|
5344
5101
|
if (res) {
|
|
@@ -5351,9 +5108,9 @@ var useGetConversionRate = () => {
|
|
|
5351
5108
|
var use_get_conversion_rate_default = useGetConversionRate;
|
|
5352
5109
|
|
|
5353
5110
|
// src/hooks/model/use-get-currency.ts
|
|
5354
|
-
|
|
5111
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
5355
5112
|
var useGetCurrency = () => {
|
|
5356
|
-
return (
|
|
5113
|
+
return useQuery8({
|
|
5357
5114
|
queryKey: ["currency"],
|
|
5358
5115
|
queryFn: () => model_service_default.getCurrency().then((res) => {
|
|
5359
5116
|
if (res) {
|
|
@@ -5366,9 +5123,9 @@ var useGetCurrency = () => {
|
|
|
5366
5123
|
var use_get_currency_default = useGetCurrency;
|
|
5367
5124
|
|
|
5368
5125
|
// src/hooks/model/use-get-detail.ts
|
|
5369
|
-
|
|
5126
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
5370
5127
|
var useGetDetail = () => {
|
|
5371
|
-
return (
|
|
5128
|
+
return useMutation26({
|
|
5372
5129
|
mutationFn: ({
|
|
5373
5130
|
model,
|
|
5374
5131
|
ids,
|
|
@@ -5385,9 +5142,9 @@ var useGetDetail = () => {
|
|
|
5385
5142
|
var use_get_detail_default = useGetDetail;
|
|
5386
5143
|
|
|
5387
5144
|
// src/hooks/model/use-get-field-onchange.ts
|
|
5388
|
-
|
|
5145
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
5389
5146
|
var useGetFieldOnChange = ({ model }) => {
|
|
5390
|
-
return (
|
|
5147
|
+
return useQuery9({
|
|
5391
5148
|
queryKey: [`field-onchange-${model}`, model],
|
|
5392
5149
|
queryFn: () => model_service_default.getListFieldsOnchange({
|
|
5393
5150
|
model
|
|
@@ -5403,13 +5160,13 @@ var useGetFieldOnChange = ({ model }) => {
|
|
|
5403
5160
|
var use_get_field_onchange_default = useGetFieldOnChange;
|
|
5404
5161
|
|
|
5405
5162
|
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
5406
|
-
|
|
5163
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
5407
5164
|
var useGetListMyBankAccount = ({
|
|
5408
5165
|
domain,
|
|
5409
5166
|
spectification,
|
|
5410
5167
|
model
|
|
5411
5168
|
}) => {
|
|
5412
|
-
return (
|
|
5169
|
+
return useQuery10({
|
|
5413
5170
|
queryKey: ["bank-account", model, domain],
|
|
5414
5171
|
queryFn: () => model_service_default.getListMyBankAccount({
|
|
5415
5172
|
domain,
|
|
@@ -5427,6 +5184,10 @@ var use_get_list_my_bank_account_default = useGetListMyBankAccount;
|
|
|
5427
5184
|
|
|
5428
5185
|
// src/models/base-model/index.ts
|
|
5429
5186
|
var BaseModel = class {
|
|
5187
|
+
name;
|
|
5188
|
+
view;
|
|
5189
|
+
actContext;
|
|
5190
|
+
fields;
|
|
5430
5191
|
constructor(init) {
|
|
5431
5192
|
this.name = init.name;
|
|
5432
5193
|
this.view = init.view;
|
|
@@ -5441,22 +5202,21 @@ var BaseModel = class {
|
|
|
5441
5202
|
modelRoot
|
|
5442
5203
|
}) {
|
|
5443
5204
|
if (Array.isArray(fields)) {
|
|
5444
|
-
let spec =
|
|
5205
|
+
let spec = { ...specification };
|
|
5445
5206
|
fields.forEach((field) => {
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
const
|
|
5451
|
-
const modelRelation = modelsData == null ? void 0 : modelsData[relation];
|
|
5207
|
+
if (!field?.type_co || field?.name && field?.type_co === "field" /* FIELD */) {
|
|
5208
|
+
if (modelsData?.[model]?.[field?.name]) {
|
|
5209
|
+
if (modelsData?.[model]?.[field?.name]?.type === "one2many" /* ONE2MANY */ || modelsData?.[model]?.[field?.name]?.type === "many2many" /* MANY2MANY */) {
|
|
5210
|
+
const relation = modelsData?.[model]?.[field?.name]?.relation;
|
|
5211
|
+
const modelRelation = modelsData?.[relation];
|
|
5452
5212
|
if (modelRelation) {
|
|
5453
|
-
spec[field
|
|
5213
|
+
spec[field?.name] = {
|
|
5454
5214
|
fields: {}
|
|
5455
5215
|
};
|
|
5456
5216
|
if (modelRoot && modelRoot === relation) {
|
|
5457
|
-
spec[field
|
|
5217
|
+
spec[field?.name].fields = { id: {} };
|
|
5458
5218
|
} else {
|
|
5459
|
-
spec[field
|
|
5219
|
+
spec[field?.name].fields = this.getSpecificationByFields({
|
|
5460
5220
|
fields: Object.values(modelRelation),
|
|
5461
5221
|
specification: {},
|
|
5462
5222
|
modelsData,
|
|
@@ -5465,42 +5225,45 @@ var BaseModel = class {
|
|
|
5465
5225
|
});
|
|
5466
5226
|
}
|
|
5467
5227
|
} else {
|
|
5468
|
-
spec[field
|
|
5228
|
+
spec[field?.name] = {
|
|
5469
5229
|
fields: {
|
|
5470
5230
|
id: {},
|
|
5471
5231
|
display_name: {}
|
|
5472
5232
|
}
|
|
5473
5233
|
};
|
|
5474
5234
|
}
|
|
5475
|
-
} else if (
|
|
5476
|
-
spec[field
|
|
5477
|
-
fields:
|
|
5235
|
+
} else if (modelsData?.[model]?.[field?.name]?.type === "many2one" /* MANY2ONE */) {
|
|
5236
|
+
spec[field?.name] = {
|
|
5237
|
+
fields: {
|
|
5478
5238
|
id: {},
|
|
5479
|
-
display_name: {}
|
|
5480
|
-
|
|
5239
|
+
display_name: {},
|
|
5240
|
+
...WIDGETAVATAR[field?.widget] ? { image_256: {} } : {},
|
|
5241
|
+
...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
|
|
5242
|
+
...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
|
|
5243
|
+
}
|
|
5481
5244
|
};
|
|
5482
5245
|
} else {
|
|
5483
|
-
spec[field
|
|
5246
|
+
spec[field?.name] = {};
|
|
5484
5247
|
}
|
|
5485
5248
|
}
|
|
5486
|
-
} else if (
|
|
5249
|
+
} else if (field?.type_co === "group" /* GROUP */ || field?.type_co === "div" /* DIV */ || field?.type_co === "span" /* SPAN */) {
|
|
5487
5250
|
const specGroup = this.getSpecificationByFields({
|
|
5488
|
-
fields: field
|
|
5251
|
+
fields: field?.fields,
|
|
5489
5252
|
specification: spec,
|
|
5490
5253
|
modelsData,
|
|
5491
5254
|
model
|
|
5492
5255
|
});
|
|
5493
|
-
spec =
|
|
5494
|
-
} else if (
|
|
5495
|
-
const relation =
|
|
5256
|
+
spec = { ...spec, ...specGroup };
|
|
5257
|
+
} else if (field?.type_co === "tree" /* TREE */ || field?.type_co === "list" /* LIST */) {
|
|
5258
|
+
const relation = modelsData?.[model]?.[field?.name]?.relation;
|
|
5496
5259
|
const specTreee = this.getSpecificationByFields({
|
|
5497
|
-
fields: field
|
|
5260
|
+
fields: field?.fields,
|
|
5498
5261
|
specification: {},
|
|
5499
5262
|
modelsData,
|
|
5500
5263
|
model: relation,
|
|
5501
5264
|
modelRoot: model
|
|
5502
5265
|
});
|
|
5503
|
-
spec =
|
|
5266
|
+
spec = { ...spec, [field?.name]: { fields: specTreee } };
|
|
5504
5267
|
}
|
|
5505
5268
|
});
|
|
5506
5269
|
return spec;
|
|
@@ -5509,19 +5272,16 @@ var BaseModel = class {
|
|
|
5509
5272
|
}
|
|
5510
5273
|
}
|
|
5511
5274
|
getTreeProps() {
|
|
5512
|
-
|
|
5513
|
-
const props = ((_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) || {};
|
|
5275
|
+
const props = this.view?.views?.list || {};
|
|
5514
5276
|
return props;
|
|
5515
5277
|
}
|
|
5516
5278
|
getTreeFields() {
|
|
5517
|
-
|
|
5518
|
-
const fields = ((_c = (_b = (_a = this.view) == null ? void 0 : _a.views) == null ? void 0 : _b.list) == null ? void 0 : _c.fields) || [];
|
|
5279
|
+
const fields = this.view?.views?.list?.fields || [];
|
|
5519
5280
|
return fields;
|
|
5520
5281
|
}
|
|
5521
5282
|
getSpecification() {
|
|
5522
|
-
var _a;
|
|
5523
5283
|
const specInit = {};
|
|
5524
|
-
const modelData =
|
|
5284
|
+
const modelData = this.view?.models || {};
|
|
5525
5285
|
const specification = this.getSpecificationByFields({
|
|
5526
5286
|
fields: this.fields,
|
|
5527
5287
|
specification: specInit,
|
|
@@ -5537,7 +5297,7 @@ var base_model_default = BaseModel;
|
|
|
5537
5297
|
// src/hooks/model/use-model.ts
|
|
5538
5298
|
var useModel = () => {
|
|
5539
5299
|
const initModel = (modelData) => {
|
|
5540
|
-
switch (modelData
|
|
5300
|
+
switch (modelData?.name) {
|
|
5541
5301
|
default:
|
|
5542
5302
|
return new base_model_default(modelData);
|
|
5543
5303
|
}
|
|
@@ -5558,9 +5318,9 @@ var useOdooDataTransform = () => {
|
|
|
5558
5318
|
var use_odoo_data_transform_default = useOdooDataTransform;
|
|
5559
5319
|
|
|
5560
5320
|
// src/hooks/model/use-onchange-form.ts
|
|
5561
|
-
|
|
5321
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
5562
5322
|
var useOnChangeForm = () => {
|
|
5563
|
-
return (
|
|
5323
|
+
return useMutation27({
|
|
5564
5324
|
mutationFn: ({
|
|
5565
5325
|
ids,
|
|
5566
5326
|
model,
|
|
@@ -5581,9 +5341,9 @@ var useOnChangeForm = () => {
|
|
|
5581
5341
|
var use_onchange_form_default = useOnChangeForm;
|
|
5582
5342
|
|
|
5583
5343
|
// src/hooks/model/use-save.ts
|
|
5584
|
-
|
|
5344
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
5585
5345
|
var useSave = () => {
|
|
5586
|
-
return (
|
|
5346
|
+
return useMutation28({
|
|
5587
5347
|
mutationFn: ({
|
|
5588
5348
|
ids,
|
|
5589
5349
|
model,
|
|
@@ -5597,18 +5357,18 @@ var useSave = () => {
|
|
|
5597
5357
|
var use_save_default = useSave;
|
|
5598
5358
|
|
|
5599
5359
|
// src/hooks/user/use-get-profile.ts
|
|
5600
|
-
|
|
5360
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
5601
5361
|
var useGetProfile = (path) => {
|
|
5602
|
-
return (
|
|
5362
|
+
return useMutation29({
|
|
5603
5363
|
mutationFn: () => user_service_default.getProfile(path)
|
|
5604
5364
|
});
|
|
5605
5365
|
};
|
|
5606
5366
|
var use_get_profile_default = useGetProfile;
|
|
5607
5367
|
|
|
5608
5368
|
// src/hooks/user/use-get-user.ts
|
|
5609
|
-
|
|
5369
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
5610
5370
|
var useGetUser = () => {
|
|
5611
|
-
return (
|
|
5371
|
+
return useMutation30({
|
|
5612
5372
|
mutationFn: ({ id, context }) => user_service_default.getUser({
|
|
5613
5373
|
id,
|
|
5614
5374
|
context
|
|
@@ -5618,9 +5378,9 @@ var useGetUser = () => {
|
|
|
5618
5378
|
var use_get_user_default = useGetUser;
|
|
5619
5379
|
|
|
5620
5380
|
// src/hooks/user/use-switch-locale.ts
|
|
5621
|
-
|
|
5381
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
5622
5382
|
var useSwitchLocale = () => {
|
|
5623
|
-
return (
|
|
5383
|
+
return useMutation31({
|
|
5624
5384
|
mutationFn: ({ data }) => {
|
|
5625
5385
|
return user_service_default.switchUserLocale({
|
|
5626
5386
|
id: data.id,
|
|
@@ -5632,9 +5392,9 @@ var useSwitchLocale = () => {
|
|
|
5632
5392
|
var use_switch_locale_default = useSwitchLocale;
|
|
5633
5393
|
|
|
5634
5394
|
// src/hooks/view/use-button.ts
|
|
5635
|
-
|
|
5395
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
5636
5396
|
var useButton = () => {
|
|
5637
|
-
return (
|
|
5397
|
+
return useMutation32({
|
|
5638
5398
|
mutationFn: ({
|
|
5639
5399
|
model,
|
|
5640
5400
|
ids,
|
|
@@ -5654,9 +5414,9 @@ var useButton = () => {
|
|
|
5654
5414
|
var use_button_default = useButton;
|
|
5655
5415
|
|
|
5656
5416
|
// src/hooks/view/use-duplicate-record.ts
|
|
5657
|
-
|
|
5417
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
5658
5418
|
var useDuplicateRecord = () => {
|
|
5659
|
-
return (
|
|
5419
|
+
return useMutation33({
|
|
5660
5420
|
mutationFn: ({
|
|
5661
5421
|
id,
|
|
5662
5422
|
model,
|
|
@@ -5671,7 +5431,7 @@ var useDuplicateRecord = () => {
|
|
|
5671
5431
|
var use_duplicate_record_default = useDuplicateRecord;
|
|
5672
5432
|
|
|
5673
5433
|
// src/hooks/view/use-get-action-detail.ts
|
|
5674
|
-
|
|
5434
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
5675
5435
|
var useGetActionDetail = ({
|
|
5676
5436
|
aid,
|
|
5677
5437
|
context,
|
|
@@ -5682,22 +5442,22 @@ var useGetActionDetail = ({
|
|
|
5682
5442
|
}) => {
|
|
5683
5443
|
const data = {
|
|
5684
5444
|
id,
|
|
5685
|
-
model: model
|
|
5445
|
+
model: model ?? "",
|
|
5686
5446
|
context
|
|
5687
5447
|
};
|
|
5688
|
-
return (
|
|
5448
|
+
return useQuery11({
|
|
5689
5449
|
queryKey,
|
|
5690
|
-
queryFn: () =>
|
|
5450
|
+
queryFn: async () => {
|
|
5691
5451
|
if (aid) {
|
|
5692
|
-
const res =
|
|
5452
|
+
const res = await view_service_default.getActionDetail(aid, context);
|
|
5693
5453
|
if (res && res.length > 0) {
|
|
5694
5454
|
return res[0];
|
|
5695
5455
|
}
|
|
5696
5456
|
} else {
|
|
5697
|
-
const res =
|
|
5457
|
+
const res = await form_service_default.getFormView({ data });
|
|
5698
5458
|
return res;
|
|
5699
5459
|
}
|
|
5700
|
-
}
|
|
5460
|
+
},
|
|
5701
5461
|
enabled,
|
|
5702
5462
|
refetchOnWindowFocus: false,
|
|
5703
5463
|
staleTime: Infinity
|
|
@@ -5706,9 +5466,9 @@ var useGetActionDetail = ({
|
|
|
5706
5466
|
var use_get_action_detail_default = useGetActionDetail;
|
|
5707
5467
|
|
|
5708
5468
|
// src/hooks/view/use-get-calendar.ts
|
|
5709
|
-
|
|
5469
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
5710
5470
|
var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
5711
|
-
return (
|
|
5471
|
+
return useQuery12({
|
|
5712
5472
|
queryKey,
|
|
5713
5473
|
queryFn: () => model_service_default.getListCalendar({ data: listDataProps }).then((res) => {
|
|
5714
5474
|
if (res) {
|
|
@@ -5724,12 +5484,12 @@ var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
|
5724
5484
|
var use_get_calendar_default = useGetCalendar;
|
|
5725
5485
|
|
|
5726
5486
|
// src/hooks/view/use-get-groups.ts
|
|
5727
|
-
|
|
5487
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
5728
5488
|
var useGetGroups = ({
|
|
5729
5489
|
model,
|
|
5730
5490
|
width_context
|
|
5731
5491
|
}) => {
|
|
5732
|
-
return (
|
|
5492
|
+
return useQuery13({
|
|
5733
5493
|
queryKey: [model, width_context],
|
|
5734
5494
|
queryFn: () => kanban_service_default.getGroups({
|
|
5735
5495
|
model,
|
|
@@ -5746,9 +5506,9 @@ var useGetGroups = ({
|
|
|
5746
5506
|
var use_get_groups_default = useGetGroups;
|
|
5747
5507
|
|
|
5748
5508
|
// src/hooks/view/use-get-list-data.ts
|
|
5749
|
-
|
|
5509
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
5750
5510
|
var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
5751
|
-
return (
|
|
5511
|
+
return useQuery14({
|
|
5752
5512
|
queryKey,
|
|
5753
5513
|
queryFn: () => model_service_default.getAll({ data: listDataProps }).then((res) => {
|
|
5754
5514
|
if (res) {
|
|
@@ -5764,14 +5524,13 @@ var useGetListData = (listDataProps, queryKey, enabled) => {
|
|
|
5764
5524
|
var use_get_list_data_default = useGetListData;
|
|
5765
5525
|
|
|
5766
5526
|
// src/hooks/view/use-get-menu.ts
|
|
5767
|
-
|
|
5527
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
5768
5528
|
var useGetMenu = (context, enabled) => {
|
|
5769
|
-
return (
|
|
5529
|
+
return useQuery15({
|
|
5770
5530
|
queryKey: ["menus" /* MENU */, context],
|
|
5771
5531
|
queryFn: () => view_service_default.getMenu(context).then((res) => {
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
return res == null ? void 0 : res.records;
|
|
5532
|
+
if (res && res?.records && res?.records?.length > 0) {
|
|
5533
|
+
return res?.records;
|
|
5775
5534
|
}
|
|
5776
5535
|
return [];
|
|
5777
5536
|
}),
|
|
@@ -5783,9 +5542,9 @@ var useGetMenu = (context, enabled) => {
|
|
|
5783
5542
|
var use_get_menu_default = useGetMenu;
|
|
5784
5543
|
|
|
5785
5544
|
// src/hooks/view/use-get-print-report.ts
|
|
5786
|
-
|
|
5545
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
5787
5546
|
var useGetPrintReport = () => {
|
|
5788
|
-
return (
|
|
5547
|
+
return useMutation34({
|
|
5789
5548
|
mutationFn: ({ id }) => action_service_default.getPrintReportName({
|
|
5790
5549
|
id
|
|
5791
5550
|
})
|
|
@@ -5794,14 +5553,14 @@ var useGetPrintReport = () => {
|
|
|
5794
5553
|
var use_get_print_report_default = useGetPrintReport;
|
|
5795
5554
|
|
|
5796
5555
|
// src/hooks/view/use-get-progress-bar.ts
|
|
5797
|
-
|
|
5556
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
5798
5557
|
var useGetProGressBar = ({
|
|
5799
5558
|
field,
|
|
5800
5559
|
color,
|
|
5801
5560
|
model,
|
|
5802
5561
|
width_context
|
|
5803
5562
|
}) => {
|
|
5804
|
-
return (
|
|
5563
|
+
return useQuery16({
|
|
5805
5564
|
queryKey: [],
|
|
5806
5565
|
queryFn: () => kanban_service_default.getProgressBar({
|
|
5807
5566
|
field,
|
|
@@ -5820,13 +5579,13 @@ var useGetProGressBar = ({
|
|
|
5820
5579
|
var use_get_progress_bar_default = useGetProGressBar;
|
|
5821
5580
|
|
|
5822
5581
|
// src/hooks/view/use-get-selection.ts
|
|
5823
|
-
|
|
5582
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
5824
5583
|
var useGetSelection = ({
|
|
5825
5584
|
data,
|
|
5826
5585
|
queryKey,
|
|
5827
5586
|
enabled
|
|
5828
5587
|
}) => {
|
|
5829
|
-
return (
|
|
5588
|
+
return useQuery17({
|
|
5830
5589
|
queryKey,
|
|
5831
5590
|
queryFn: () => view_service_default.getSelectionItem({ data }),
|
|
5832
5591
|
enabled,
|
|
@@ -5836,9 +5595,9 @@ var useGetSelection = ({
|
|
|
5836
5595
|
var use_get_selection_default = useGetSelection;
|
|
5837
5596
|
|
|
5838
5597
|
// src/hooks/view/use-get-view.ts
|
|
5839
|
-
|
|
5598
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
5840
5599
|
var useGetView = (viewParams, actData) => {
|
|
5841
|
-
return (
|
|
5600
|
+
return useQuery18({
|
|
5842
5601
|
queryKey: ["get_view_by_action" /* GET_VIEW_BY_ACTION */, viewParams],
|
|
5843
5602
|
queryFn: () => view_service_default.getView(viewParams),
|
|
5844
5603
|
enabled: !!actData,
|
|
@@ -5849,9 +5608,9 @@ var useGetView = (viewParams, actData) => {
|
|
|
5849
5608
|
var use_get_view_default = useGetView;
|
|
5850
5609
|
|
|
5851
5610
|
// src/hooks/view/use-load-action.ts
|
|
5852
|
-
|
|
5611
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
5853
5612
|
var useLoadAction = () => {
|
|
5854
|
-
return (
|
|
5613
|
+
return useMutation35({
|
|
5855
5614
|
mutationFn: ({
|
|
5856
5615
|
idAction,
|
|
5857
5616
|
context
|
|
@@ -5866,9 +5625,9 @@ var useLoadAction = () => {
|
|
|
5866
5625
|
var use_load_action_default = useLoadAction;
|
|
5867
5626
|
|
|
5868
5627
|
// src/hooks/view/use-load-message.ts
|
|
5869
|
-
|
|
5628
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
5870
5629
|
var useLoadMessage = () => {
|
|
5871
|
-
return (
|
|
5630
|
+
return useQuery19({
|
|
5872
5631
|
queryKey: [`load-message-failure`],
|
|
5873
5632
|
queryFn: () => view_service_default.loadMessages(),
|
|
5874
5633
|
refetchOnWindowFocus: false
|
|
@@ -5877,9 +5636,9 @@ var useLoadMessage = () => {
|
|
|
5877
5636
|
var use_load_message_default = useLoadMessage;
|
|
5878
5637
|
|
|
5879
5638
|
// src/hooks/view/use-print.ts
|
|
5880
|
-
|
|
5639
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
5881
5640
|
var usePrint = () => {
|
|
5882
|
-
return (
|
|
5641
|
+
return useMutation36({
|
|
5883
5642
|
mutationFn: ({ id, report, db }) => action_service_default.print({
|
|
5884
5643
|
id,
|
|
5885
5644
|
report,
|
|
@@ -5890,9 +5649,9 @@ var usePrint = () => {
|
|
|
5890
5649
|
var use_print_default = usePrint;
|
|
5891
5650
|
|
|
5892
5651
|
// src/hooks/view/use-remove-row.ts
|
|
5893
|
-
|
|
5652
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
5894
5653
|
var useRemoveRow = () => {
|
|
5895
|
-
return (
|
|
5654
|
+
return useMutation37({
|
|
5896
5655
|
mutationFn: ({
|
|
5897
5656
|
model,
|
|
5898
5657
|
ids,
|
|
@@ -5907,9 +5666,9 @@ var useRemoveRow = () => {
|
|
|
5907
5666
|
var use_remove_row_default = useRemoveRow;
|
|
5908
5667
|
|
|
5909
5668
|
// src/hooks/view/use-resequence.ts
|
|
5910
|
-
|
|
5669
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
5911
5670
|
var useGetResequence = (model, resIds, context, offset) => {
|
|
5912
|
-
return (
|
|
5671
|
+
return useQuery20({
|
|
5913
5672
|
queryKey: [],
|
|
5914
5673
|
queryFn: () => view_service_default.getResequence({
|
|
5915
5674
|
model,
|
|
@@ -5924,9 +5683,9 @@ var useGetResequence = (model, resIds, context, offset) => {
|
|
|
5924
5683
|
var use_resequence_default = useGetResequence;
|
|
5925
5684
|
|
|
5926
5685
|
// src/hooks/view/use-run-action.ts
|
|
5927
|
-
|
|
5686
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
5928
5687
|
var useRunAction = () => {
|
|
5929
|
-
return (
|
|
5688
|
+
return useMutation38({
|
|
5930
5689
|
mutationFn: ({
|
|
5931
5690
|
idAction,
|
|
5932
5691
|
context
|
|
@@ -5939,9 +5698,9 @@ var useRunAction = () => {
|
|
|
5939
5698
|
var use_run_action_default = useRunAction;
|
|
5940
5699
|
|
|
5941
5700
|
// src/hooks/view/use-signin-sso.ts
|
|
5942
|
-
|
|
5701
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
5943
5702
|
var useSignInSSO = () => {
|
|
5944
|
-
return (
|
|
5703
|
+
return useMutation39({
|
|
5945
5704
|
mutationFn: ({
|
|
5946
5705
|
redirect_uri,
|
|
5947
5706
|
state,
|
|
@@ -5962,9 +5721,9 @@ var useSignInSSO = () => {
|
|
|
5962
5721
|
var use_signin_sso_default = useSignInSSO;
|
|
5963
5722
|
|
|
5964
5723
|
// src/hooks/view/use-verify-2FA.ts
|
|
5965
|
-
|
|
5724
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
5966
5725
|
var useVerify2FA = () => {
|
|
5967
|
-
return (
|
|
5726
|
+
return useMutation40({
|
|
5968
5727
|
mutationFn: ({
|
|
5969
5728
|
method,
|
|
5970
5729
|
with_context,
|
|
@@ -5985,9 +5744,9 @@ var useVerify2FA = () => {
|
|
|
5985
5744
|
var use_verify_2FA_default = useVerify2FA;
|
|
5986
5745
|
|
|
5987
5746
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
5988
|
-
|
|
5747
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
5989
5748
|
var useGet2FAMethods = () => {
|
|
5990
|
-
return (
|
|
5749
|
+
return useMutation41({
|
|
5991
5750
|
mutationFn: ({
|
|
5992
5751
|
method,
|
|
5993
5752
|
with_context
|
|
@@ -6002,9 +5761,9 @@ var useGet2FAMethods = () => {
|
|
|
6002
5761
|
var uset_get_2FA_method_default = useGet2FAMethods;
|
|
6003
5762
|
|
|
6004
5763
|
// src/hooks/view/use-get-fields-view-security.ts
|
|
6005
|
-
|
|
5764
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
6006
5765
|
var useGetFieldsViewSecurity = () => {
|
|
6007
|
-
return (
|
|
5766
|
+
return useMutation42({
|
|
6008
5767
|
mutationFn: ({
|
|
6009
5768
|
method,
|
|
6010
5769
|
token,
|
|
@@ -6021,9 +5780,9 @@ var useGetFieldsViewSecurity = () => {
|
|
|
6021
5780
|
var use_get_fields_view_security_default = useGetFieldsViewSecurity;
|
|
6022
5781
|
|
|
6023
5782
|
// src/hooks/view/use-grant-access.ts
|
|
6024
|
-
|
|
5783
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
6025
5784
|
var useGrantAccess = () => {
|
|
6026
|
-
return (
|
|
5785
|
+
return useMutation43({
|
|
6027
5786
|
mutationFn: ({
|
|
6028
5787
|
redirect_uri,
|
|
6029
5788
|
state,
|
|
@@ -6042,9 +5801,9 @@ var useGrantAccess = () => {
|
|
|
6042
5801
|
var use_grant_access_default = useGrantAccess;
|
|
6043
5802
|
|
|
6044
5803
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
6045
|
-
|
|
5804
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
6046
5805
|
var useRemoveTotpSetup = () => {
|
|
6047
|
-
return (
|
|
5806
|
+
return useMutation44({
|
|
6048
5807
|
mutationFn: ({ method, token }) => {
|
|
6049
5808
|
return view_service_default.removeTotpSetUp({
|
|
6050
5809
|
method,
|
|
@@ -6056,9 +5815,9 @@ var useRemoveTotpSetup = () => {
|
|
|
6056
5815
|
var use_remove_totp_setup_default = useRemoveTotpSetup;
|
|
6057
5816
|
|
|
6058
5817
|
// src/hooks/view/use-request-setup-totp.ts
|
|
6059
|
-
|
|
5818
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
6060
5819
|
var useRequestSetupTotp = () => {
|
|
6061
|
-
return (
|
|
5820
|
+
return useMutation45({
|
|
6062
5821
|
mutationFn: ({ method, token }) => {
|
|
6063
5822
|
return view_service_default.requestSetupTotp({
|
|
6064
5823
|
method,
|
|
@@ -6070,9 +5829,9 @@ var useRequestSetupTotp = () => {
|
|
|
6070
5829
|
var use_request_setup_totp_default = useRequestSetupTotp;
|
|
6071
5830
|
|
|
6072
5831
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
6073
|
-
|
|
5832
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
6074
5833
|
var useSettingsWebRead2fa = () => {
|
|
6075
|
-
return (
|
|
5834
|
+
return useMutation46({
|
|
6076
5835
|
mutationFn: ({
|
|
6077
5836
|
method,
|
|
6078
5837
|
token,
|
|
@@ -6091,9 +5850,9 @@ var useSettingsWebRead2fa = () => {
|
|
|
6091
5850
|
var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
|
|
6092
5851
|
|
|
6093
5852
|
// src/hooks/view/use-verify-totp.ts
|
|
6094
|
-
|
|
5853
|
+
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
6095
5854
|
var useVerifyTotp = () => {
|
|
6096
|
-
return (
|
|
5855
|
+
return useMutation47({
|
|
6097
5856
|
mutationFn: ({
|
|
6098
5857
|
method,
|
|
6099
5858
|
action_token,
|
|
@@ -6108,74 +5867,74 @@ var useVerifyTotp = () => {
|
|
|
6108
5867
|
});
|
|
6109
5868
|
};
|
|
6110
5869
|
var use_verify_totp_default = useVerifyTotp;
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
useVerify2FA,
|
|
6180
|
-
useVerifyTotp
|
|
6181
|
-
}
|
|
5870
|
+
export {
|
|
5871
|
+
use_button_default as useButton,
|
|
5872
|
+
use_change_status_default as useChangeStatus,
|
|
5873
|
+
use_delete_default as useDelete,
|
|
5874
|
+
use_delete_comment_default as useDeleteComment,
|
|
5875
|
+
use_duplicate_record_default as useDuplicateRecord,
|
|
5876
|
+
uss_execute_import_default as useExecuteImport,
|
|
5877
|
+
use_export_excel_default as useExportExcel,
|
|
5878
|
+
use_forgot_password_default as useForgotPassword,
|
|
5879
|
+
use_forgotpassword_sso_default as useForgotPasswordSSO,
|
|
5880
|
+
uset_get_2FA_method_default as useGet2FAMethods,
|
|
5881
|
+
use_get_access_by_code_default as useGetAccessByCode,
|
|
5882
|
+
use_get_action_detail_default as useGetActionDetail,
|
|
5883
|
+
use_get_all_default as useGetAll,
|
|
5884
|
+
use_get_calendar_default as useGetCalendar,
|
|
5885
|
+
use_get_comment_default as useGetComment,
|
|
5886
|
+
use_get_company_info_default as useGetCompanyInfo,
|
|
5887
|
+
use_get_conversion_rate_default as useGetConversionRate,
|
|
5888
|
+
use_get_currency_default as useGetCurrency,
|
|
5889
|
+
use_get_current_company_default as useGetCurrentCompany,
|
|
5890
|
+
use_get_detail_default as useGetDetail,
|
|
5891
|
+
use_get_field_export_default as useGetFieldExport,
|
|
5892
|
+
use_get_field_onchange_default as useGetFieldOnChange,
|
|
5893
|
+
use_get_fields_view_security_default as useGetFieldsViewSecurity,
|
|
5894
|
+
use_get_file_excel_default as useGetFileExcel,
|
|
5895
|
+
use_get_form_view_default as useGetFormView,
|
|
5896
|
+
use_get_groups_default as useGetGroups,
|
|
5897
|
+
use_get_image_default as useGetImage,
|
|
5898
|
+
use_get_list_company_default as useGetListCompany,
|
|
5899
|
+
use_get_list_data_default as useGetListData,
|
|
5900
|
+
use_get_list_my_bank_account_default as useGetListMyBankAccount,
|
|
5901
|
+
use_get_menu_default as useGetMenu,
|
|
5902
|
+
use_get_print_report_default as useGetPrintReport,
|
|
5903
|
+
use_get_progress_bar_default as useGetProGressBar,
|
|
5904
|
+
use_get_profile_default as useGetProfile,
|
|
5905
|
+
use_get_provider_default as useGetProvider,
|
|
5906
|
+
use_resequence_default as useGetResequence,
|
|
5907
|
+
use_get_selection_default as useGetSelection,
|
|
5908
|
+
use_get_user_default as useGetUser,
|
|
5909
|
+
use_get_view_default as useGetView,
|
|
5910
|
+
use_grant_access_default as useGrantAccess,
|
|
5911
|
+
use_isvalid_token_default as useIsValidToken,
|
|
5912
|
+
use_load_action_default as useLoadAction,
|
|
5913
|
+
use_load_message_default as useLoadMessage,
|
|
5914
|
+
use_login_credential_default as useLoginCredential,
|
|
5915
|
+
use_login_socical_default as useLoginSocial,
|
|
5916
|
+
use_logout_default as useLogout,
|
|
5917
|
+
use_model_default as useModel,
|
|
5918
|
+
use_odoo_data_transform_default as useOdooDataTransform,
|
|
5919
|
+
use_onchange_form_default as useOnChangeForm,
|
|
5920
|
+
use_parse_preview_default as useParsePreview,
|
|
5921
|
+
use_print_default as usePrint,
|
|
5922
|
+
use_remove_row_default as useRemoveRow,
|
|
5923
|
+
use_remove_totp_setup_default as useRemoveTotpSetup,
|
|
5924
|
+
use_request_setup_totp_default as useRequestSetupTotp,
|
|
5925
|
+
use_reset_password_default as useResetPassword,
|
|
5926
|
+
use_reset_password_sso_default as useResetPasswordSSO,
|
|
5927
|
+
use_run_action_default as useRunAction,
|
|
5928
|
+
use_save_default as useSave,
|
|
5929
|
+
use_send_comment_default as useSendComment,
|
|
5930
|
+
use_settings_web_read_2fa_default as useSettingsWebRead2fa,
|
|
5931
|
+
use_signin_sso_default as useSignInSSO,
|
|
5932
|
+
use_switch_locale_default as useSwitchLocale,
|
|
5933
|
+
use_update_password_default as useUpdatePassword,
|
|
5934
|
+
use_upload_file_default as useUploadFile,
|
|
5935
|
+
use_upload_id_file_default as useUploadIdFile,
|
|
5936
|
+
use_upload_image_default as useUploadImage,
|
|
5937
|
+
use_validate_action_token_default as useValidateActionToken,
|
|
5938
|
+
use_verify_2FA_default as useVerify2FA,
|
|
5939
|
+
use_verify_totp_default as useVerifyTotp
|
|
5940
|
+
};
|