@fctc/interface-logic 5.0.3 → 5.0.4
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/constants.d.mts +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +5 -1
- package/dist/hooks.d.ts +5 -1
- package/dist/hooks.js +36 -3
- package/dist/hooks.mjs +35 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -3
- package/dist/index.mjs +36 -3
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +56 -24
- package/dist/provider.mjs +45 -13
- package/dist/services.d.mts +4 -0
- package/dist/services.d.ts +4 -0
- package/dist/services.js +122 -98
- package/dist/services.mjs +119 -95
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/services/action-service/index.ts
|
|
2
|
-
import { useCallback as
|
|
2
|
+
import { useCallback as useCallback63 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -34,6 +34,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
34
34
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
35
35
|
UriConstants2["LOGOUT"] = "/logout";
|
|
36
36
|
UriConstants2["SUPABASE_LOGIN_PATH"] = "/api/v2/auth/login";
|
|
37
|
+
UriConstants2["SUPABASE_CURRENT_USER"] = "/api/v2/auth/me";
|
|
37
38
|
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
38
39
|
UriConstants2["SEARCH_READ"] = "/search_read";
|
|
39
40
|
UriConstants2["CREATE_PATH"] = "/create";
|
|
@@ -5296,6 +5297,25 @@ var getPartnerTitlesSupabaseService = () => {
|
|
|
5296
5297
|
};
|
|
5297
5298
|
};
|
|
5298
5299
|
|
|
5300
|
+
// src/services/pos-service/supabase/get-supa-current-user.ts
|
|
5301
|
+
import { useCallback as useCallback62 } from "react";
|
|
5302
|
+
var getSupaCurrentUser = (env) => {
|
|
5303
|
+
const getSupaCurrentUser2 = useCallback62(
|
|
5304
|
+
({ tenantId }) => {
|
|
5305
|
+
return env?.requests.get("/api/v2/auth/me" /* SUPABASE_CURRENT_USER */, {
|
|
5306
|
+
headers: {
|
|
5307
|
+
"Content-Type": "application/json",
|
|
5308
|
+
"x-tenant-id": tenantId
|
|
5309
|
+
}
|
|
5310
|
+
});
|
|
5311
|
+
},
|
|
5312
|
+
[env]
|
|
5313
|
+
);
|
|
5314
|
+
return {
|
|
5315
|
+
getSupaCurrentUser: getSupaCurrentUser2
|
|
5316
|
+
};
|
|
5317
|
+
};
|
|
5318
|
+
|
|
5299
5319
|
// src/services/pos-service/index.ts
|
|
5300
5320
|
var serviceFactories = [
|
|
5301
5321
|
addEntityService,
|
|
@@ -5356,7 +5376,8 @@ var serviceFactories = [
|
|
|
5356
5376
|
assignRoleService,
|
|
5357
5377
|
getStatesSupabaseService,
|
|
5358
5378
|
getWardsSupabaseService,
|
|
5359
|
-
getPartnerTitlesSupabaseService
|
|
5379
|
+
getPartnerTitlesSupabaseService,
|
|
5380
|
+
getSupaCurrentUser
|
|
5360
5381
|
];
|
|
5361
5382
|
var usePosService = () => {
|
|
5362
5383
|
const { env } = useEnv();
|
|
@@ -5554,6 +5575,9 @@ import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
|
5554
5575
|
// src/hooks/pos/supabase/use-assign-role.ts
|
|
5555
5576
|
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
5556
5577
|
|
|
5578
|
+
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
5579
|
+
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
5580
|
+
|
|
5557
5581
|
// src/provider/service-provider.tsx
|
|
5558
5582
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5559
5583
|
var ServiceContext = createContext3(null);
|
|
@@ -5565,7 +5589,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5565
5589
|
// src/services/action-service/index.ts
|
|
5566
5590
|
function useActionService() {
|
|
5567
5591
|
const { env } = useEnv();
|
|
5568
|
-
const loadAction =
|
|
5592
|
+
const loadAction = useCallback63(
|
|
5569
5593
|
async ({
|
|
5570
5594
|
idAction,
|
|
5571
5595
|
context,
|
|
@@ -5589,7 +5613,7 @@ function useActionService() {
|
|
|
5589
5613
|
},
|
|
5590
5614
|
[env]
|
|
5591
5615
|
);
|
|
5592
|
-
const callButton =
|
|
5616
|
+
const callButton = useCallback63(
|
|
5593
5617
|
async ({
|
|
5594
5618
|
model,
|
|
5595
5619
|
ids = [],
|
|
@@ -5623,7 +5647,7 @@ function useActionService() {
|
|
|
5623
5647
|
},
|
|
5624
5648
|
[env]
|
|
5625
5649
|
);
|
|
5626
|
-
const removeRows =
|
|
5650
|
+
const removeRows = useCallback63(
|
|
5627
5651
|
async ({
|
|
5628
5652
|
model,
|
|
5629
5653
|
ids,
|
|
@@ -5649,7 +5673,7 @@ function useActionService() {
|
|
|
5649
5673
|
},
|
|
5650
5674
|
[env]
|
|
5651
5675
|
);
|
|
5652
|
-
const duplicateRecord =
|
|
5676
|
+
const duplicateRecord = useCallback63(
|
|
5653
5677
|
async ({
|
|
5654
5678
|
model,
|
|
5655
5679
|
id,
|
|
@@ -5675,7 +5699,7 @@ function useActionService() {
|
|
|
5675
5699
|
},
|
|
5676
5700
|
[env]
|
|
5677
5701
|
);
|
|
5678
|
-
const getPrintReportName =
|
|
5702
|
+
const getPrintReportName = useCallback63(
|
|
5679
5703
|
async ({ id }) => {
|
|
5680
5704
|
const jsonData = {
|
|
5681
5705
|
model: "ir.actions.report",
|
|
@@ -5693,7 +5717,7 @@ function useActionService() {
|
|
|
5693
5717
|
},
|
|
5694
5718
|
[env]
|
|
5695
5719
|
);
|
|
5696
|
-
const print =
|
|
5720
|
+
const print = useCallback63(
|
|
5697
5721
|
async ({ id, report, db }) => {
|
|
5698
5722
|
const jsonData = {
|
|
5699
5723
|
report,
|
|
@@ -5711,7 +5735,7 @@ function useActionService() {
|
|
|
5711
5735
|
},
|
|
5712
5736
|
[env]
|
|
5713
5737
|
);
|
|
5714
|
-
const runAction =
|
|
5738
|
+
const runAction = useCallback63(
|
|
5715
5739
|
async ({
|
|
5716
5740
|
idAction,
|
|
5717
5741
|
context,
|
|
@@ -5738,7 +5762,7 @@ function useActionService() {
|
|
|
5738
5762
|
},
|
|
5739
5763
|
[env]
|
|
5740
5764
|
);
|
|
5741
|
-
const generateSerialNumber =
|
|
5765
|
+
const generateSerialNumber = useCallback63(
|
|
5742
5766
|
async ({
|
|
5743
5767
|
kwargs,
|
|
5744
5768
|
context,
|
|
@@ -5763,7 +5787,7 @@ function useActionService() {
|
|
|
5763
5787
|
},
|
|
5764
5788
|
[env]
|
|
5765
5789
|
);
|
|
5766
|
-
const actionServerHome =
|
|
5790
|
+
const actionServerHome = useCallback63(async () => {
|
|
5767
5791
|
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5768
5792
|
}, [env]);
|
|
5769
5793
|
return {
|
|
@@ -5780,11 +5804,11 @@ function useActionService() {
|
|
|
5780
5804
|
}
|
|
5781
5805
|
|
|
5782
5806
|
// src/services/auth-service/index.ts
|
|
5783
|
-
import { useCallback as
|
|
5807
|
+
import { useCallback as useCallback64 } from "react";
|
|
5784
5808
|
function useAuthService() {
|
|
5785
5809
|
const { env } = useEnv();
|
|
5786
5810
|
const supabase = useSupabaseOptional();
|
|
5787
|
-
const login =
|
|
5811
|
+
const login = useCallback64(
|
|
5788
5812
|
async (body) => {
|
|
5789
5813
|
const payload = Object.fromEntries(
|
|
5790
5814
|
Object.entries({
|
|
@@ -5809,7 +5833,7 @@ function useAuthService() {
|
|
|
5809
5833
|
},
|
|
5810
5834
|
[env]
|
|
5811
5835
|
);
|
|
5812
|
-
const loginTenantUser =
|
|
5836
|
+
const loginTenantUser = useCallback64(
|
|
5813
5837
|
async (body) => {
|
|
5814
5838
|
const payload = {
|
|
5815
5839
|
email: body.email,
|
|
@@ -5824,7 +5848,7 @@ function useAuthService() {
|
|
|
5824
5848
|
},
|
|
5825
5849
|
[env]
|
|
5826
5850
|
);
|
|
5827
|
-
const forgotPassword =
|
|
5851
|
+
const forgotPassword = useCallback64(
|
|
5828
5852
|
async (email) => {
|
|
5829
5853
|
const bodyData = {
|
|
5830
5854
|
login: email,
|
|
@@ -5838,7 +5862,7 @@ function useAuthService() {
|
|
|
5838
5862
|
},
|
|
5839
5863
|
[env]
|
|
5840
5864
|
);
|
|
5841
|
-
const forgotPasswordSSO =
|
|
5865
|
+
const forgotPasswordSSO = useCallback64(
|
|
5842
5866
|
async ({
|
|
5843
5867
|
email,
|
|
5844
5868
|
with_context,
|
|
@@ -5861,7 +5885,7 @@ function useAuthService() {
|
|
|
5861
5885
|
},
|
|
5862
5886
|
[env]
|
|
5863
5887
|
);
|
|
5864
|
-
const resetPassword =
|
|
5888
|
+
const resetPassword = useCallback64(
|
|
5865
5889
|
async (data, token) => {
|
|
5866
5890
|
const bodyData = {
|
|
5867
5891
|
token,
|
|
@@ -5876,7 +5900,7 @@ function useAuthService() {
|
|
|
5876
5900
|
},
|
|
5877
5901
|
[env]
|
|
5878
5902
|
);
|
|
5879
|
-
const resetPasswordSSO =
|
|
5903
|
+
const resetPasswordSSO = useCallback64(
|
|
5880
5904
|
async ({
|
|
5881
5905
|
method,
|
|
5882
5906
|
password,
|
|
@@ -5899,7 +5923,7 @@ function useAuthService() {
|
|
|
5899
5923
|
},
|
|
5900
5924
|
[env]
|
|
5901
5925
|
);
|
|
5902
|
-
const updatePassword =
|
|
5926
|
+
const updatePassword = useCallback64(
|
|
5903
5927
|
async (data, token) => {
|
|
5904
5928
|
const bodyData = {
|
|
5905
5929
|
token,
|
|
@@ -5914,7 +5938,7 @@ function useAuthService() {
|
|
|
5914
5938
|
},
|
|
5915
5939
|
[env]
|
|
5916
5940
|
);
|
|
5917
|
-
const isValidToken =
|
|
5941
|
+
const isValidToken = useCallback64(
|
|
5918
5942
|
async (token) => {
|
|
5919
5943
|
const bodyData = {
|
|
5920
5944
|
token
|
|
@@ -5927,7 +5951,7 @@ function useAuthService() {
|
|
|
5927
5951
|
},
|
|
5928
5952
|
[env]
|
|
5929
5953
|
);
|
|
5930
|
-
const isValidActionToken =
|
|
5954
|
+
const isValidActionToken = useCallback64(
|
|
5931
5955
|
async (actionToken) => {
|
|
5932
5956
|
const bodyData = {};
|
|
5933
5957
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5940,7 +5964,7 @@ function useAuthService() {
|
|
|
5940
5964
|
},
|
|
5941
5965
|
[env]
|
|
5942
5966
|
);
|
|
5943
|
-
const loginSocial =
|
|
5967
|
+
const loginSocial = useCallback64(
|
|
5944
5968
|
async ({
|
|
5945
5969
|
db,
|
|
5946
5970
|
state,
|
|
@@ -5958,13 +5982,13 @@ function useAuthService() {
|
|
|
5958
5982
|
},
|
|
5959
5983
|
[env]
|
|
5960
5984
|
);
|
|
5961
|
-
const getProviders =
|
|
5985
|
+
const getProviders = useCallback64(
|
|
5962
5986
|
async (db) => {
|
|
5963
5987
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5964
5988
|
},
|
|
5965
5989
|
[env]
|
|
5966
5990
|
);
|
|
5967
|
-
const getAccessByCode =
|
|
5991
|
+
const getAccessByCode = useCallback64(
|
|
5968
5992
|
async (code) => {
|
|
5969
5993
|
const data = new URLSearchParams();
|
|
5970
5994
|
data.append("code", code);
|
|
@@ -5984,7 +6008,7 @@ function useAuthService() {
|
|
|
5984
6008
|
},
|
|
5985
6009
|
[env]
|
|
5986
6010
|
);
|
|
5987
|
-
const logout =
|
|
6011
|
+
const logout = useCallback64(
|
|
5988
6012
|
async (service) => {
|
|
5989
6013
|
return env?.requests?.post(
|
|
5990
6014
|
"/logout" /* LOGOUT */,
|
|
@@ -6001,7 +6025,7 @@ function useAuthService() {
|
|
|
6001
6025
|
},
|
|
6002
6026
|
[env]
|
|
6003
6027
|
);
|
|
6004
|
-
const getTenantMapping =
|
|
6028
|
+
const getTenantMapping = useCallback64(
|
|
6005
6029
|
async ({ shortName, service }) => {
|
|
6006
6030
|
const bodyData = {
|
|
6007
6031
|
short_name: shortName
|
|
@@ -6019,7 +6043,7 @@ function useAuthService() {
|
|
|
6019
6043
|
},
|
|
6020
6044
|
[env]
|
|
6021
6045
|
);
|
|
6022
|
-
const getToken =
|
|
6046
|
+
const getToken = useCallback64(
|
|
6023
6047
|
async ({
|
|
6024
6048
|
phone,
|
|
6025
6049
|
name,
|
|
@@ -6064,10 +6088,10 @@ function useAuthService() {
|
|
|
6064
6088
|
}
|
|
6065
6089
|
|
|
6066
6090
|
// src/services/company-service/index.ts
|
|
6067
|
-
import { useCallback as
|
|
6091
|
+
import { useCallback as useCallback65 } from "react";
|
|
6068
6092
|
function useCompanyService() {
|
|
6069
6093
|
const { env } = useEnv();
|
|
6070
|
-
const getCurrentCompany =
|
|
6094
|
+
const getCurrentCompany = useCallback65(
|
|
6071
6095
|
async (service, extraHeaders) => {
|
|
6072
6096
|
return await env.requests.get(
|
|
6073
6097
|
"/company" /* COMPANY_PATH */,
|
|
@@ -6084,7 +6108,7 @@ function useCompanyService() {
|
|
|
6084
6108
|
},
|
|
6085
6109
|
[env]
|
|
6086
6110
|
);
|
|
6087
|
-
const getInfoCompany =
|
|
6111
|
+
const getInfoCompany = useCallback65(
|
|
6088
6112
|
async (id, service) => {
|
|
6089
6113
|
const jsonData = {
|
|
6090
6114
|
ids: [id],
|
|
@@ -6120,10 +6144,10 @@ function useCompanyService() {
|
|
|
6120
6144
|
}
|
|
6121
6145
|
|
|
6122
6146
|
// src/services/excel-service/index.ts
|
|
6123
|
-
import { useCallback as
|
|
6147
|
+
import { useCallback as useCallback66 } from "react";
|
|
6124
6148
|
function useExcelService() {
|
|
6125
6149
|
const { env } = useEnv();
|
|
6126
|
-
const uploadFileExcel =
|
|
6150
|
+
const uploadFileExcel = useCallback66(
|
|
6127
6151
|
async ({
|
|
6128
6152
|
formData,
|
|
6129
6153
|
service,
|
|
@@ -6140,7 +6164,7 @@ function useExcelService() {
|
|
|
6140
6164
|
},
|
|
6141
6165
|
[env]
|
|
6142
6166
|
);
|
|
6143
|
-
const uploadIdFile =
|
|
6167
|
+
const uploadIdFile = useCallback66(
|
|
6144
6168
|
async ({
|
|
6145
6169
|
formData,
|
|
6146
6170
|
service,
|
|
@@ -6157,7 +6181,7 @@ function useExcelService() {
|
|
|
6157
6181
|
},
|
|
6158
6182
|
[env]
|
|
6159
6183
|
);
|
|
6160
|
-
const parsePreview =
|
|
6184
|
+
const parsePreview = useCallback66(
|
|
6161
6185
|
async ({
|
|
6162
6186
|
id,
|
|
6163
6187
|
selectedSheet,
|
|
@@ -6206,7 +6230,7 @@ function useExcelService() {
|
|
|
6206
6230
|
},
|
|
6207
6231
|
[env]
|
|
6208
6232
|
);
|
|
6209
|
-
const executeImport =
|
|
6233
|
+
const executeImport = useCallback66(
|
|
6210
6234
|
async ({
|
|
6211
6235
|
columns,
|
|
6212
6236
|
fields,
|
|
@@ -6240,7 +6264,7 @@ function useExcelService() {
|
|
|
6240
6264
|
},
|
|
6241
6265
|
[env]
|
|
6242
6266
|
);
|
|
6243
|
-
const getFileExcel =
|
|
6267
|
+
const getFileExcel = useCallback66(
|
|
6244
6268
|
async ({
|
|
6245
6269
|
model,
|
|
6246
6270
|
service,
|
|
@@ -6264,7 +6288,7 @@ function useExcelService() {
|
|
|
6264
6288
|
},
|
|
6265
6289
|
[env]
|
|
6266
6290
|
);
|
|
6267
|
-
const getFieldExport =
|
|
6291
|
+
const getFieldExport = useCallback66(
|
|
6268
6292
|
async ({
|
|
6269
6293
|
ids,
|
|
6270
6294
|
model,
|
|
@@ -6304,7 +6328,7 @@ function useExcelService() {
|
|
|
6304
6328
|
},
|
|
6305
6329
|
[env]
|
|
6306
6330
|
);
|
|
6307
|
-
const exportExcel =
|
|
6331
|
+
const exportExcel = useCallback66(
|
|
6308
6332
|
async ({
|
|
6309
6333
|
model,
|
|
6310
6334
|
domain,
|
|
@@ -6352,10 +6376,10 @@ function useExcelService() {
|
|
|
6352
6376
|
}
|
|
6353
6377
|
|
|
6354
6378
|
// src/services/form-service/index.ts
|
|
6355
|
-
import { useCallback as
|
|
6379
|
+
import { useCallback as useCallback67 } from "react";
|
|
6356
6380
|
function useFormService() {
|
|
6357
6381
|
const { env } = useEnv();
|
|
6358
|
-
const getComment =
|
|
6382
|
+
const getComment = useCallback67(
|
|
6359
6383
|
async ({ data }) => {
|
|
6360
6384
|
const jsonData = {
|
|
6361
6385
|
thread_id: data.thread_id,
|
|
@@ -6373,7 +6397,7 @@ function useFormService() {
|
|
|
6373
6397
|
},
|
|
6374
6398
|
[env]
|
|
6375
6399
|
);
|
|
6376
|
-
const getThreadData =
|
|
6400
|
+
const getThreadData = useCallback67(
|
|
6377
6401
|
async ({
|
|
6378
6402
|
data,
|
|
6379
6403
|
xNode,
|
|
@@ -6400,7 +6424,7 @@ function useFormService() {
|
|
|
6400
6424
|
},
|
|
6401
6425
|
[env]
|
|
6402
6426
|
);
|
|
6403
|
-
const getThreadMessages =
|
|
6427
|
+
const getThreadMessages = useCallback67(
|
|
6404
6428
|
async ({
|
|
6405
6429
|
data,
|
|
6406
6430
|
xNode,
|
|
@@ -6426,7 +6450,7 @@ function useFormService() {
|
|
|
6426
6450
|
},
|
|
6427
6451
|
[env]
|
|
6428
6452
|
);
|
|
6429
|
-
const sentComment =
|
|
6453
|
+
const sentComment = useCallback67(
|
|
6430
6454
|
async ({ data }) => {
|
|
6431
6455
|
const jsonData = {
|
|
6432
6456
|
context: {
|
|
@@ -6454,7 +6478,7 @@ function useFormService() {
|
|
|
6454
6478
|
},
|
|
6455
6479
|
[env]
|
|
6456
6480
|
);
|
|
6457
|
-
const deleteComment =
|
|
6481
|
+
const deleteComment = useCallback67(
|
|
6458
6482
|
async ({ data }) => {
|
|
6459
6483
|
const jsonData = {
|
|
6460
6484
|
attachment_ids: [],
|
|
@@ -6470,7 +6494,7 @@ function useFormService() {
|
|
|
6470
6494
|
},
|
|
6471
6495
|
[env]
|
|
6472
6496
|
);
|
|
6473
|
-
const getImage =
|
|
6497
|
+
const getImage = useCallback67(
|
|
6474
6498
|
async ({ data }) => {
|
|
6475
6499
|
return env.requests.get(
|
|
6476
6500
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6483,7 +6507,7 @@ function useFormService() {
|
|
|
6483
6507
|
},
|
|
6484
6508
|
[env]
|
|
6485
6509
|
);
|
|
6486
|
-
const uploadImage =
|
|
6510
|
+
const uploadImage = useCallback67(
|
|
6487
6511
|
async ({
|
|
6488
6512
|
formData,
|
|
6489
6513
|
service,
|
|
@@ -6502,7 +6526,7 @@ function useFormService() {
|
|
|
6502
6526
|
},
|
|
6503
6527
|
[env]
|
|
6504
6528
|
);
|
|
6505
|
-
const uploadFile =
|
|
6529
|
+
const uploadFile = useCallback67(
|
|
6506
6530
|
async ({
|
|
6507
6531
|
formData,
|
|
6508
6532
|
service,
|
|
@@ -6522,7 +6546,7 @@ function useFormService() {
|
|
|
6522
6546
|
},
|
|
6523
6547
|
[env]
|
|
6524
6548
|
);
|
|
6525
|
-
const getFormView =
|
|
6549
|
+
const getFormView = useCallback67(
|
|
6526
6550
|
async ({ data }) => {
|
|
6527
6551
|
const jsonData = {
|
|
6528
6552
|
model: data.model,
|
|
@@ -6538,7 +6562,7 @@ function useFormService() {
|
|
|
6538
6562
|
},
|
|
6539
6563
|
[env]
|
|
6540
6564
|
);
|
|
6541
|
-
const changeStatus =
|
|
6565
|
+
const changeStatus = useCallback67(
|
|
6542
6566
|
async ({ data }) => {
|
|
6543
6567
|
const vals = {
|
|
6544
6568
|
[data.name]: data.stage_id
|
|
@@ -6567,7 +6591,7 @@ function useFormService() {
|
|
|
6567
6591
|
},
|
|
6568
6592
|
[env]
|
|
6569
6593
|
);
|
|
6570
|
-
const getExternalTab =
|
|
6594
|
+
const getExternalTab = useCallback67(
|
|
6571
6595
|
async ({ method, context, service, xNode }) => {
|
|
6572
6596
|
return env?.requests?.post(
|
|
6573
6597
|
"/call" /* CALL_PATH */,
|
|
@@ -6602,10 +6626,10 @@ function useFormService() {
|
|
|
6602
6626
|
}
|
|
6603
6627
|
|
|
6604
6628
|
// src/services/kanban-service/index.ts
|
|
6605
|
-
import { useCallback as
|
|
6629
|
+
import { useCallback as useCallback68 } from "react";
|
|
6606
6630
|
function useKanbanService() {
|
|
6607
6631
|
const { env } = useEnv();
|
|
6608
|
-
const getGroups =
|
|
6632
|
+
const getGroups = useCallback68(
|
|
6609
6633
|
async ({ model, width_context }) => {
|
|
6610
6634
|
const jsonData = {
|
|
6611
6635
|
model,
|
|
@@ -6625,7 +6649,7 @@ function useKanbanService() {
|
|
|
6625
6649
|
},
|
|
6626
6650
|
[env]
|
|
6627
6651
|
);
|
|
6628
|
-
const getProgressBar =
|
|
6652
|
+
const getProgressBar = useCallback68(
|
|
6629
6653
|
async ({ field, color, model, width_context }) => {
|
|
6630
6654
|
const jsonData = {
|
|
6631
6655
|
model,
|
|
@@ -6655,10 +6679,10 @@ function useKanbanService() {
|
|
|
6655
6679
|
}
|
|
6656
6680
|
|
|
6657
6681
|
// src/services/model-service/index.ts
|
|
6658
|
-
import { useCallback as
|
|
6682
|
+
import { useCallback as useCallback69 } from "react";
|
|
6659
6683
|
function useModelService() {
|
|
6660
6684
|
const { env } = useEnv();
|
|
6661
|
-
const getListMyBankAccount =
|
|
6685
|
+
const getListMyBankAccount = useCallback69(
|
|
6662
6686
|
async ({
|
|
6663
6687
|
domain,
|
|
6664
6688
|
spectification,
|
|
@@ -6682,7 +6706,7 @@ function useModelService() {
|
|
|
6682
6706
|
},
|
|
6683
6707
|
[env]
|
|
6684
6708
|
);
|
|
6685
|
-
const getCurrency =
|
|
6709
|
+
const getCurrency = useCallback69(async () => {
|
|
6686
6710
|
const jsonData = {
|
|
6687
6711
|
model: "res.currency",
|
|
6688
6712
|
method: "web_search_read",
|
|
@@ -6702,7 +6726,7 @@ function useModelService() {
|
|
|
6702
6726
|
}
|
|
6703
6727
|
});
|
|
6704
6728
|
}, [env]);
|
|
6705
|
-
const getConversionRate =
|
|
6729
|
+
const getConversionRate = useCallback69(async () => {
|
|
6706
6730
|
const jsonData = {
|
|
6707
6731
|
model: "res.currency",
|
|
6708
6732
|
method: "web_search_read",
|
|
@@ -6728,7 +6752,7 @@ function useModelService() {
|
|
|
6728
6752
|
}
|
|
6729
6753
|
});
|
|
6730
6754
|
}, [env]);
|
|
6731
|
-
const getAll =
|
|
6755
|
+
const getAll = useCallback69(
|
|
6732
6756
|
async ({
|
|
6733
6757
|
data,
|
|
6734
6758
|
service,
|
|
@@ -6770,7 +6794,7 @@ function useModelService() {
|
|
|
6770
6794
|
},
|
|
6771
6795
|
[env]
|
|
6772
6796
|
);
|
|
6773
|
-
const getListCalendar =
|
|
6797
|
+
const getListCalendar = useCallback69(
|
|
6774
6798
|
async ({ data }) => {
|
|
6775
6799
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6776
6800
|
fields: data.fields,
|
|
@@ -6801,7 +6825,7 @@ function useModelService() {
|
|
|
6801
6825
|
},
|
|
6802
6826
|
[env]
|
|
6803
6827
|
);
|
|
6804
|
-
const getList =
|
|
6828
|
+
const getList = useCallback69(
|
|
6805
6829
|
async ({
|
|
6806
6830
|
model,
|
|
6807
6831
|
ids = [],
|
|
@@ -6833,7 +6857,7 @@ function useModelService() {
|
|
|
6833
6857
|
},
|
|
6834
6858
|
[env]
|
|
6835
6859
|
);
|
|
6836
|
-
const getDetail =
|
|
6860
|
+
const getDetail = useCallback69(
|
|
6837
6861
|
async ({
|
|
6838
6862
|
ids = [],
|
|
6839
6863
|
model,
|
|
@@ -6865,7 +6889,7 @@ function useModelService() {
|
|
|
6865
6889
|
},
|
|
6866
6890
|
[env]
|
|
6867
6891
|
);
|
|
6868
|
-
const save =
|
|
6892
|
+
const save = useCallback69(
|
|
6869
6893
|
async ({
|
|
6870
6894
|
model,
|
|
6871
6895
|
ids = [],
|
|
@@ -6900,7 +6924,7 @@ function useModelService() {
|
|
|
6900
6924
|
},
|
|
6901
6925
|
[env]
|
|
6902
6926
|
);
|
|
6903
|
-
const deleteApi =
|
|
6927
|
+
const deleteApi = useCallback69(
|
|
6904
6928
|
async ({ ids = [], model, service }) => {
|
|
6905
6929
|
const jsonData = {
|
|
6906
6930
|
model,
|
|
@@ -6920,7 +6944,7 @@ function useModelService() {
|
|
|
6920
6944
|
},
|
|
6921
6945
|
[env]
|
|
6922
6946
|
);
|
|
6923
|
-
const onChange =
|
|
6947
|
+
const onChange = useCallback69(
|
|
6924
6948
|
async ({
|
|
6925
6949
|
ids = [],
|
|
6926
6950
|
model,
|
|
@@ -6956,7 +6980,7 @@ function useModelService() {
|
|
|
6956
6980
|
},
|
|
6957
6981
|
[env]
|
|
6958
6982
|
);
|
|
6959
|
-
const getListFieldsOnchange =
|
|
6983
|
+
const getListFieldsOnchange = useCallback69(
|
|
6960
6984
|
async ({
|
|
6961
6985
|
model,
|
|
6962
6986
|
service,
|
|
@@ -6980,7 +7004,7 @@ function useModelService() {
|
|
|
6980
7004
|
},
|
|
6981
7005
|
[env]
|
|
6982
7006
|
);
|
|
6983
|
-
const parseORMOdoo =
|
|
7007
|
+
const parseORMOdoo = useCallback69((data) => {
|
|
6984
7008
|
for (const key in data) {
|
|
6985
7009
|
if (key === "display_name") {
|
|
6986
7010
|
delete data[key];
|
|
@@ -6991,7 +7015,7 @@ function useModelService() {
|
|
|
6991
7015
|
}
|
|
6992
7016
|
return { ...data };
|
|
6993
7017
|
}, []);
|
|
6994
|
-
const toDataJS =
|
|
7018
|
+
const toDataJS = useCallback69(
|
|
6995
7019
|
(data, viewData, model) => {
|
|
6996
7020
|
for (const key in data) {
|
|
6997
7021
|
if (data[key] === false) {
|
|
@@ -7049,10 +7073,10 @@ function useModelService() {
|
|
|
7049
7073
|
}
|
|
7050
7074
|
|
|
7051
7075
|
// src/services/user-service/index.ts
|
|
7052
|
-
import { useCallback as
|
|
7076
|
+
import { useCallback as useCallback70 } from "react";
|
|
7053
7077
|
function useUserService() {
|
|
7054
7078
|
const { env } = useEnv();
|
|
7055
|
-
const getProfile =
|
|
7079
|
+
const getProfile = useCallback70(
|
|
7056
7080
|
async (service, path, extraHeaders) => {
|
|
7057
7081
|
return env?.requests?.get(
|
|
7058
7082
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -7069,7 +7093,7 @@ function useUserService() {
|
|
|
7069
7093
|
},
|
|
7070
7094
|
[env]
|
|
7071
7095
|
);
|
|
7072
|
-
const getUser =
|
|
7096
|
+
const getUser = useCallback70(
|
|
7073
7097
|
async ({ context, id }) => {
|
|
7074
7098
|
const jsonData = {
|
|
7075
7099
|
model: "res.users",
|
|
@@ -7107,7 +7131,7 @@ function useUserService() {
|
|
|
7107
7131
|
},
|
|
7108
7132
|
[env]
|
|
7109
7133
|
);
|
|
7110
|
-
const switchUserLocale =
|
|
7134
|
+
const switchUserLocale = useCallback70(
|
|
7111
7135
|
async ({ id, values, service }) => {
|
|
7112
7136
|
const jsonData = {
|
|
7113
7137
|
model: "res.users",
|
|
@@ -7135,10 +7159,10 @@ function useUserService() {
|
|
|
7135
7159
|
}
|
|
7136
7160
|
|
|
7137
7161
|
// src/services/view-service/index.ts
|
|
7138
|
-
import { useCallback as
|
|
7162
|
+
import { useCallback as useCallback71 } from "react";
|
|
7139
7163
|
function useViewService() {
|
|
7140
7164
|
const { env } = useEnv();
|
|
7141
|
-
const getView =
|
|
7165
|
+
const getView = useCallback71(
|
|
7142
7166
|
async ({
|
|
7143
7167
|
model,
|
|
7144
7168
|
views,
|
|
@@ -7178,7 +7202,7 @@ function useViewService() {
|
|
|
7178
7202
|
},
|
|
7179
7203
|
[env]
|
|
7180
7204
|
);
|
|
7181
|
-
const getMenu =
|
|
7205
|
+
const getMenu = useCallback71(
|
|
7182
7206
|
async (context, specification, domain, service) => {
|
|
7183
7207
|
const jsonData = {
|
|
7184
7208
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -7209,7 +7233,7 @@ function useViewService() {
|
|
|
7209
7233
|
},
|
|
7210
7234
|
[env]
|
|
7211
7235
|
);
|
|
7212
|
-
const getActionDetail =
|
|
7236
|
+
const getActionDetail = useCallback71(
|
|
7213
7237
|
async (aid, context) => {
|
|
7214
7238
|
const jsonData = {
|
|
7215
7239
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7239,7 +7263,7 @@ function useViewService() {
|
|
|
7239
7263
|
},
|
|
7240
7264
|
[env]
|
|
7241
7265
|
);
|
|
7242
|
-
const getResequence =
|
|
7266
|
+
const getResequence = useCallback71(
|
|
7243
7267
|
async ({
|
|
7244
7268
|
model,
|
|
7245
7269
|
ids,
|
|
@@ -7269,7 +7293,7 @@ function useViewService() {
|
|
|
7269
7293
|
},
|
|
7270
7294
|
[env]
|
|
7271
7295
|
);
|
|
7272
|
-
const getSelectionItem =
|
|
7296
|
+
const getSelectionItem = useCallback71(
|
|
7273
7297
|
async ({
|
|
7274
7298
|
data,
|
|
7275
7299
|
service,
|
|
@@ -7306,7 +7330,7 @@ function useViewService() {
|
|
|
7306
7330
|
},
|
|
7307
7331
|
[env]
|
|
7308
7332
|
);
|
|
7309
|
-
const loadMessages =
|
|
7333
|
+
const loadMessages = useCallback71(async () => {
|
|
7310
7334
|
return env.requests.post(
|
|
7311
7335
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7312
7336
|
{},
|
|
@@ -7317,14 +7341,14 @@ function useViewService() {
|
|
|
7317
7341
|
}
|
|
7318
7342
|
);
|
|
7319
7343
|
}, [env]);
|
|
7320
|
-
const getVersion =
|
|
7344
|
+
const getVersion = useCallback71(async () => {
|
|
7321
7345
|
return env?.requests?.get("", {
|
|
7322
7346
|
headers: {
|
|
7323
7347
|
"Content-Type": "application/json"
|
|
7324
7348
|
}
|
|
7325
7349
|
});
|
|
7326
7350
|
}, [env]);
|
|
7327
|
-
const grantAccess =
|
|
7351
|
+
const grantAccess = useCallback71(
|
|
7328
7352
|
async ({
|
|
7329
7353
|
redirect_uri,
|
|
7330
7354
|
state,
|
|
@@ -7351,7 +7375,7 @@ function useViewService() {
|
|
|
7351
7375
|
},
|
|
7352
7376
|
[env]
|
|
7353
7377
|
);
|
|
7354
|
-
const removeTotpSetUp =
|
|
7378
|
+
const removeTotpSetUp = useCallback71(
|
|
7355
7379
|
async ({ method, token }) => {
|
|
7356
7380
|
const jsonData = {
|
|
7357
7381
|
method,
|
|
@@ -7372,7 +7396,7 @@ function useViewService() {
|
|
|
7372
7396
|
},
|
|
7373
7397
|
[env]
|
|
7374
7398
|
);
|
|
7375
|
-
const requestSetupTotp =
|
|
7399
|
+
const requestSetupTotp = useCallback71(
|
|
7376
7400
|
async ({ method, token }) => {
|
|
7377
7401
|
const jsonData = {
|
|
7378
7402
|
method,
|
|
@@ -7391,7 +7415,7 @@ function useViewService() {
|
|
|
7391
7415
|
},
|
|
7392
7416
|
[env]
|
|
7393
7417
|
);
|
|
7394
|
-
const settingsWebRead2fa =
|
|
7418
|
+
const settingsWebRead2fa = useCallback71(
|
|
7395
7419
|
async ({
|
|
7396
7420
|
method,
|
|
7397
7421
|
model,
|
|
@@ -7419,7 +7443,7 @@ function useViewService() {
|
|
|
7419
7443
|
},
|
|
7420
7444
|
[env]
|
|
7421
7445
|
);
|
|
7422
|
-
const signInSSO =
|
|
7446
|
+
const signInSSO = useCallback71(
|
|
7423
7447
|
async ({
|
|
7424
7448
|
redirect_uri,
|
|
7425
7449
|
state,
|
|
@@ -7451,7 +7475,7 @@ function useViewService() {
|
|
|
7451
7475
|
},
|
|
7452
7476
|
[env]
|
|
7453
7477
|
);
|
|
7454
|
-
const verify2FA =
|
|
7478
|
+
const verify2FA = useCallback71(
|
|
7455
7479
|
({
|
|
7456
7480
|
method,
|
|
7457
7481
|
with_context,
|
|
@@ -7484,7 +7508,7 @@ function useViewService() {
|
|
|
7484
7508
|
},
|
|
7485
7509
|
[env]
|
|
7486
7510
|
);
|
|
7487
|
-
const get2FAMethods =
|
|
7511
|
+
const get2FAMethods = useCallback71(
|
|
7488
7512
|
({ method, with_context }) => {
|
|
7489
7513
|
const jsonData = {
|
|
7490
7514
|
method,
|
|
@@ -7503,7 +7527,7 @@ function useViewService() {
|
|
|
7503
7527
|
},
|
|
7504
7528
|
[env]
|
|
7505
7529
|
);
|
|
7506
|
-
const verifyTotp =
|
|
7530
|
+
const verifyTotp = useCallback71(
|
|
7507
7531
|
({
|
|
7508
7532
|
method,
|
|
7509
7533
|
action_token,
|
|
@@ -7528,7 +7552,7 @@ function useViewService() {
|
|
|
7528
7552
|
},
|
|
7529
7553
|
[env]
|
|
7530
7554
|
);
|
|
7531
|
-
const getNotifications =
|
|
7555
|
+
const getNotifications = useCallback71(
|
|
7532
7556
|
async ({
|
|
7533
7557
|
service,
|
|
7534
7558
|
xNode,
|
|
@@ -7548,7 +7572,7 @@ function useViewService() {
|
|
|
7548
7572
|
},
|
|
7549
7573
|
[env]
|
|
7550
7574
|
);
|
|
7551
|
-
const getCountry =
|
|
7575
|
+
const getCountry = useCallback71(
|
|
7552
7576
|
async ({
|
|
7553
7577
|
service,
|
|
7554
7578
|
xNode,
|
|
@@ -7575,7 +7599,7 @@ function useViewService() {
|
|
|
7575
7599
|
},
|
|
7576
7600
|
[env]
|
|
7577
7601
|
);
|
|
7578
|
-
const getCity =
|
|
7602
|
+
const getCity = useCallback71(
|
|
7579
7603
|
async ({
|
|
7580
7604
|
service,
|
|
7581
7605
|
xNode,
|
|
@@ -7602,7 +7626,7 @@ function useViewService() {
|
|
|
7602
7626
|
},
|
|
7603
7627
|
[env]
|
|
7604
7628
|
);
|
|
7605
|
-
const getWard =
|
|
7629
|
+
const getWard = useCallback71(
|
|
7606
7630
|
async ({
|
|
7607
7631
|
service,
|
|
7608
7632
|
xNode,
|
|
@@ -7627,7 +7651,7 @@ function useViewService() {
|
|
|
7627
7651
|
},
|
|
7628
7652
|
[env]
|
|
7629
7653
|
);
|
|
7630
|
-
const getPartnerTitle =
|
|
7654
|
+
const getPartnerTitle = useCallback71(
|
|
7631
7655
|
async ({
|
|
7632
7656
|
service,
|
|
7633
7657
|
xNode,
|
|
@@ -7679,10 +7703,10 @@ function useViewService() {
|
|
|
7679
7703
|
}
|
|
7680
7704
|
|
|
7681
7705
|
// src/services/dashboard-service/index.ts
|
|
7682
|
-
import { useCallback as
|
|
7706
|
+
import { useCallback as useCallback72 } from "react";
|
|
7683
7707
|
function useDashboardService() {
|
|
7684
7708
|
const { env } = useEnv();
|
|
7685
|
-
const readGroup =
|
|
7709
|
+
const readGroup = useCallback72(
|
|
7686
7710
|
async ({
|
|
7687
7711
|
service,
|
|
7688
7712
|
xNode,
|
|
@@ -7699,7 +7723,7 @@ function useDashboardService() {
|
|
|
7699
7723
|
},
|
|
7700
7724
|
[env]
|
|
7701
7725
|
);
|
|
7702
|
-
const getDataChart =
|
|
7726
|
+
const getDataChart = useCallback72(
|
|
7703
7727
|
async ({
|
|
7704
7728
|
service,
|
|
7705
7729
|
xNode,
|