@fctc/interface-logic 4.5.3 → 4.5.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 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +2 -2
- package/dist/constants.mjs +2 -2
- package/dist/hooks.js +7 -1
- package/dist/hooks.mjs +7 -1
- package/dist/provider.js +12 -6
- package/dist/provider.mjs +7 -1
- package/dist/services.js +103 -97
- package/dist/services.mjs +100 -94
- 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 useCallback42 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -112,7 +112,7 @@ var MODEL_TO_TABLE = {
|
|
|
112
112
|
["loyalty.reward" /* LOYALTY_REWARD */]: "loyalty_rewards" /* LOYALTY_REWARDS */,
|
|
113
113
|
["pos.config" /* POS_CONFIG */]: "pos_configs" /* POS_CONFIGS */,
|
|
114
114
|
["pos.session" /* POS_SESSION */]: "pos_sessions" /* POS_SESSIONS */,
|
|
115
|
-
["pos.order.line" /* POS_ORDER_LINE */]: "
|
|
115
|
+
["pos.order.line" /* POS_ORDER_LINE */]: "order_line" /* ORDER_LINE */,
|
|
116
116
|
["pos.order" /* POS_ORDER */]: "orders" /* ORDERS */,
|
|
117
117
|
["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
|
|
118
118
|
["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
|
|
@@ -4697,6 +4697,12 @@ import { useMutation as useMutation88 } from "@tanstack/react-query";
|
|
|
4697
4697
|
// src/services/pos-service/supabase/create-order.ts
|
|
4698
4698
|
import { useCallback as useCallback39 } from "react";
|
|
4699
4699
|
|
|
4700
|
+
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4701
|
+
import { useCallback as useCallback40 } from "react";
|
|
4702
|
+
|
|
4703
|
+
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4704
|
+
import { useCallback as useCallback41 } from "react";
|
|
4705
|
+
|
|
4700
4706
|
// src/hooks/pos/supabase/use-add-table.ts
|
|
4701
4707
|
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
4702
4708
|
|
|
@@ -4726,7 +4732,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
4726
4732
|
// src/services/action-service/index.ts
|
|
4727
4733
|
function useActionService() {
|
|
4728
4734
|
const { env } = useEnv();
|
|
4729
|
-
const loadAction =
|
|
4735
|
+
const loadAction = useCallback42(
|
|
4730
4736
|
async ({
|
|
4731
4737
|
idAction,
|
|
4732
4738
|
context,
|
|
@@ -4750,7 +4756,7 @@ function useActionService() {
|
|
|
4750
4756
|
},
|
|
4751
4757
|
[env]
|
|
4752
4758
|
);
|
|
4753
|
-
const callButton =
|
|
4759
|
+
const callButton = useCallback42(
|
|
4754
4760
|
async ({
|
|
4755
4761
|
model,
|
|
4756
4762
|
ids = [],
|
|
@@ -4784,7 +4790,7 @@ function useActionService() {
|
|
|
4784
4790
|
},
|
|
4785
4791
|
[env]
|
|
4786
4792
|
);
|
|
4787
|
-
const removeRows =
|
|
4793
|
+
const removeRows = useCallback42(
|
|
4788
4794
|
async ({
|
|
4789
4795
|
model,
|
|
4790
4796
|
ids,
|
|
@@ -4810,7 +4816,7 @@ function useActionService() {
|
|
|
4810
4816
|
},
|
|
4811
4817
|
[env]
|
|
4812
4818
|
);
|
|
4813
|
-
const duplicateRecord =
|
|
4819
|
+
const duplicateRecord = useCallback42(
|
|
4814
4820
|
async ({
|
|
4815
4821
|
model,
|
|
4816
4822
|
id,
|
|
@@ -4836,7 +4842,7 @@ function useActionService() {
|
|
|
4836
4842
|
},
|
|
4837
4843
|
[env]
|
|
4838
4844
|
);
|
|
4839
|
-
const getPrintReportName =
|
|
4845
|
+
const getPrintReportName = useCallback42(
|
|
4840
4846
|
async ({ id }) => {
|
|
4841
4847
|
const jsonData = {
|
|
4842
4848
|
model: "ir.actions.report",
|
|
@@ -4854,7 +4860,7 @@ function useActionService() {
|
|
|
4854
4860
|
},
|
|
4855
4861
|
[env]
|
|
4856
4862
|
);
|
|
4857
|
-
const print =
|
|
4863
|
+
const print = useCallback42(
|
|
4858
4864
|
async ({ id, report, db }) => {
|
|
4859
4865
|
const jsonData = {
|
|
4860
4866
|
report,
|
|
@@ -4872,7 +4878,7 @@ function useActionService() {
|
|
|
4872
4878
|
},
|
|
4873
4879
|
[env]
|
|
4874
4880
|
);
|
|
4875
|
-
const runAction =
|
|
4881
|
+
const runAction = useCallback42(
|
|
4876
4882
|
async ({
|
|
4877
4883
|
idAction,
|
|
4878
4884
|
context,
|
|
@@ -4899,7 +4905,7 @@ function useActionService() {
|
|
|
4899
4905
|
},
|
|
4900
4906
|
[env]
|
|
4901
4907
|
);
|
|
4902
|
-
const generateSerialNumber =
|
|
4908
|
+
const generateSerialNumber = useCallback42(
|
|
4903
4909
|
async ({
|
|
4904
4910
|
kwargs,
|
|
4905
4911
|
context,
|
|
@@ -4937,11 +4943,11 @@ function useActionService() {
|
|
|
4937
4943
|
}
|
|
4938
4944
|
|
|
4939
4945
|
// src/services/auth-service/index.ts
|
|
4940
|
-
import { useCallback as
|
|
4946
|
+
import { useCallback as useCallback43 } from "react";
|
|
4941
4947
|
function useAuthService() {
|
|
4942
4948
|
const { env } = useEnv();
|
|
4943
4949
|
const supabase = useSupabaseOptional();
|
|
4944
|
-
const login =
|
|
4950
|
+
const login = useCallback43(
|
|
4945
4951
|
async (body) => {
|
|
4946
4952
|
const payload = Object.fromEntries(
|
|
4947
4953
|
Object.entries({
|
|
@@ -4966,7 +4972,7 @@ function useAuthService() {
|
|
|
4966
4972
|
},
|
|
4967
4973
|
[env]
|
|
4968
4974
|
);
|
|
4969
|
-
const loginSupabase =
|
|
4975
|
+
const loginSupabase = useCallback43(
|
|
4970
4976
|
async (body) => {
|
|
4971
4977
|
if (!supabase) {
|
|
4972
4978
|
return {
|
|
@@ -4982,7 +4988,7 @@ function useAuthService() {
|
|
|
4982
4988
|
},
|
|
4983
4989
|
[supabase]
|
|
4984
4990
|
);
|
|
4985
|
-
const forgotPassword =
|
|
4991
|
+
const forgotPassword = useCallback43(
|
|
4986
4992
|
async (email) => {
|
|
4987
4993
|
const bodyData = {
|
|
4988
4994
|
login: email,
|
|
@@ -4996,7 +5002,7 @@ function useAuthService() {
|
|
|
4996
5002
|
},
|
|
4997
5003
|
[env]
|
|
4998
5004
|
);
|
|
4999
|
-
const forgotPasswordSSO =
|
|
5005
|
+
const forgotPasswordSSO = useCallback43(
|
|
5000
5006
|
async ({
|
|
5001
5007
|
email,
|
|
5002
5008
|
with_context,
|
|
@@ -5019,7 +5025,7 @@ function useAuthService() {
|
|
|
5019
5025
|
},
|
|
5020
5026
|
[env]
|
|
5021
5027
|
);
|
|
5022
|
-
const resetPassword =
|
|
5028
|
+
const resetPassword = useCallback43(
|
|
5023
5029
|
async (data, token) => {
|
|
5024
5030
|
const bodyData = {
|
|
5025
5031
|
token,
|
|
@@ -5034,7 +5040,7 @@ function useAuthService() {
|
|
|
5034
5040
|
},
|
|
5035
5041
|
[env]
|
|
5036
5042
|
);
|
|
5037
|
-
const resetPasswordSSO =
|
|
5043
|
+
const resetPasswordSSO = useCallback43(
|
|
5038
5044
|
async ({
|
|
5039
5045
|
method,
|
|
5040
5046
|
password,
|
|
@@ -5057,7 +5063,7 @@ function useAuthService() {
|
|
|
5057
5063
|
},
|
|
5058
5064
|
[env]
|
|
5059
5065
|
);
|
|
5060
|
-
const updatePassword =
|
|
5066
|
+
const updatePassword = useCallback43(
|
|
5061
5067
|
async (data, token) => {
|
|
5062
5068
|
const bodyData = {
|
|
5063
5069
|
token,
|
|
@@ -5072,7 +5078,7 @@ function useAuthService() {
|
|
|
5072
5078
|
},
|
|
5073
5079
|
[env]
|
|
5074
5080
|
);
|
|
5075
|
-
const isValidToken =
|
|
5081
|
+
const isValidToken = useCallback43(
|
|
5076
5082
|
async (token) => {
|
|
5077
5083
|
const bodyData = {
|
|
5078
5084
|
token
|
|
@@ -5085,7 +5091,7 @@ function useAuthService() {
|
|
|
5085
5091
|
},
|
|
5086
5092
|
[env]
|
|
5087
5093
|
);
|
|
5088
|
-
const isValidActionToken =
|
|
5094
|
+
const isValidActionToken = useCallback43(
|
|
5089
5095
|
async (actionToken) => {
|
|
5090
5096
|
const bodyData = {};
|
|
5091
5097
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5098,7 +5104,7 @@ function useAuthService() {
|
|
|
5098
5104
|
},
|
|
5099
5105
|
[env]
|
|
5100
5106
|
);
|
|
5101
|
-
const loginSocial =
|
|
5107
|
+
const loginSocial = useCallback43(
|
|
5102
5108
|
async ({
|
|
5103
5109
|
db,
|
|
5104
5110
|
state,
|
|
@@ -5116,13 +5122,13 @@ function useAuthService() {
|
|
|
5116
5122
|
},
|
|
5117
5123
|
[env]
|
|
5118
5124
|
);
|
|
5119
|
-
const getProviders =
|
|
5125
|
+
const getProviders = useCallback43(
|
|
5120
5126
|
async (db) => {
|
|
5121
5127
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5122
5128
|
},
|
|
5123
5129
|
[env]
|
|
5124
5130
|
);
|
|
5125
|
-
const getAccessByCode =
|
|
5131
|
+
const getAccessByCode = useCallback43(
|
|
5126
5132
|
async (code) => {
|
|
5127
5133
|
const data = new URLSearchParams();
|
|
5128
5134
|
data.append("code", code);
|
|
@@ -5142,7 +5148,7 @@ function useAuthService() {
|
|
|
5142
5148
|
},
|
|
5143
5149
|
[env]
|
|
5144
5150
|
);
|
|
5145
|
-
const logout =
|
|
5151
|
+
const logout = useCallback43(
|
|
5146
5152
|
async (service) => {
|
|
5147
5153
|
return env?.requests?.post(
|
|
5148
5154
|
"/logout" /* LOGOUT */,
|
|
@@ -5159,7 +5165,7 @@ function useAuthService() {
|
|
|
5159
5165
|
},
|
|
5160
5166
|
[env]
|
|
5161
5167
|
);
|
|
5162
|
-
const getTenantMapping =
|
|
5168
|
+
const getTenantMapping = useCallback43(
|
|
5163
5169
|
async ({ shortName, service }) => {
|
|
5164
5170
|
const bodyData = {
|
|
5165
5171
|
short_name: shortName
|
|
@@ -5177,7 +5183,7 @@ function useAuthService() {
|
|
|
5177
5183
|
},
|
|
5178
5184
|
[env]
|
|
5179
5185
|
);
|
|
5180
|
-
const getToken =
|
|
5186
|
+
const getToken = useCallback43(
|
|
5181
5187
|
async ({
|
|
5182
5188
|
phone,
|
|
5183
5189
|
name,
|
|
@@ -5222,10 +5228,10 @@ function useAuthService() {
|
|
|
5222
5228
|
}
|
|
5223
5229
|
|
|
5224
5230
|
// src/services/company-service/index.ts
|
|
5225
|
-
import { useCallback as
|
|
5231
|
+
import { useCallback as useCallback44 } from "react";
|
|
5226
5232
|
function useCompanyService() {
|
|
5227
5233
|
const { env } = useEnv();
|
|
5228
|
-
const getCurrentCompany =
|
|
5234
|
+
const getCurrentCompany = useCallback44(
|
|
5229
5235
|
async (service, extraHeaders) => {
|
|
5230
5236
|
return await env.requests.get(
|
|
5231
5237
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5242,7 +5248,7 @@ function useCompanyService() {
|
|
|
5242
5248
|
},
|
|
5243
5249
|
[env]
|
|
5244
5250
|
);
|
|
5245
|
-
const getInfoCompany =
|
|
5251
|
+
const getInfoCompany = useCallback44(
|
|
5246
5252
|
async (id, service) => {
|
|
5247
5253
|
const jsonData = {
|
|
5248
5254
|
ids: [id],
|
|
@@ -5278,10 +5284,10 @@ function useCompanyService() {
|
|
|
5278
5284
|
}
|
|
5279
5285
|
|
|
5280
5286
|
// src/services/excel-service/index.ts
|
|
5281
|
-
import { useCallback as
|
|
5287
|
+
import { useCallback as useCallback45 } from "react";
|
|
5282
5288
|
function useExcelService() {
|
|
5283
5289
|
const { env } = useEnv();
|
|
5284
|
-
const uploadFileExcel =
|
|
5290
|
+
const uploadFileExcel = useCallback45(
|
|
5285
5291
|
async ({
|
|
5286
5292
|
formData,
|
|
5287
5293
|
service,
|
|
@@ -5298,7 +5304,7 @@ function useExcelService() {
|
|
|
5298
5304
|
},
|
|
5299
5305
|
[env]
|
|
5300
5306
|
);
|
|
5301
|
-
const uploadIdFile =
|
|
5307
|
+
const uploadIdFile = useCallback45(
|
|
5302
5308
|
async ({
|
|
5303
5309
|
formData,
|
|
5304
5310
|
service,
|
|
@@ -5315,7 +5321,7 @@ function useExcelService() {
|
|
|
5315
5321
|
},
|
|
5316
5322
|
[env]
|
|
5317
5323
|
);
|
|
5318
|
-
const parsePreview =
|
|
5324
|
+
const parsePreview = useCallback45(
|
|
5319
5325
|
async ({
|
|
5320
5326
|
id,
|
|
5321
5327
|
selectedSheet,
|
|
@@ -5364,7 +5370,7 @@ function useExcelService() {
|
|
|
5364
5370
|
},
|
|
5365
5371
|
[env]
|
|
5366
5372
|
);
|
|
5367
|
-
const executeImport =
|
|
5373
|
+
const executeImport = useCallback45(
|
|
5368
5374
|
async ({
|
|
5369
5375
|
columns,
|
|
5370
5376
|
fields,
|
|
@@ -5398,7 +5404,7 @@ function useExcelService() {
|
|
|
5398
5404
|
},
|
|
5399
5405
|
[env]
|
|
5400
5406
|
);
|
|
5401
|
-
const getFileExcel =
|
|
5407
|
+
const getFileExcel = useCallback45(
|
|
5402
5408
|
async ({
|
|
5403
5409
|
model,
|
|
5404
5410
|
service,
|
|
@@ -5422,7 +5428,7 @@ function useExcelService() {
|
|
|
5422
5428
|
},
|
|
5423
5429
|
[env]
|
|
5424
5430
|
);
|
|
5425
|
-
const getFieldExport =
|
|
5431
|
+
const getFieldExport = useCallback45(
|
|
5426
5432
|
async ({
|
|
5427
5433
|
ids,
|
|
5428
5434
|
model,
|
|
@@ -5462,7 +5468,7 @@ function useExcelService() {
|
|
|
5462
5468
|
},
|
|
5463
5469
|
[env]
|
|
5464
5470
|
);
|
|
5465
|
-
const exportExcel =
|
|
5471
|
+
const exportExcel = useCallback45(
|
|
5466
5472
|
async ({
|
|
5467
5473
|
model,
|
|
5468
5474
|
domain,
|
|
@@ -5510,10 +5516,10 @@ function useExcelService() {
|
|
|
5510
5516
|
}
|
|
5511
5517
|
|
|
5512
5518
|
// src/services/form-service/index.ts
|
|
5513
|
-
import { useCallback as
|
|
5519
|
+
import { useCallback as useCallback46 } from "react";
|
|
5514
5520
|
function useFormService() {
|
|
5515
5521
|
const { env } = useEnv();
|
|
5516
|
-
const getComment =
|
|
5522
|
+
const getComment = useCallback46(
|
|
5517
5523
|
async ({ data }) => {
|
|
5518
5524
|
const jsonData = {
|
|
5519
5525
|
thread_id: data.thread_id,
|
|
@@ -5531,7 +5537,7 @@ function useFormService() {
|
|
|
5531
5537
|
},
|
|
5532
5538
|
[env]
|
|
5533
5539
|
);
|
|
5534
|
-
const getThreadData =
|
|
5540
|
+
const getThreadData = useCallback46(
|
|
5535
5541
|
async ({
|
|
5536
5542
|
data,
|
|
5537
5543
|
xNode,
|
|
@@ -5558,7 +5564,7 @@ function useFormService() {
|
|
|
5558
5564
|
},
|
|
5559
5565
|
[env]
|
|
5560
5566
|
);
|
|
5561
|
-
const getThreadMessages =
|
|
5567
|
+
const getThreadMessages = useCallback46(
|
|
5562
5568
|
async ({
|
|
5563
5569
|
data,
|
|
5564
5570
|
xNode,
|
|
@@ -5584,7 +5590,7 @@ function useFormService() {
|
|
|
5584
5590
|
},
|
|
5585
5591
|
[env]
|
|
5586
5592
|
);
|
|
5587
|
-
const sentComment =
|
|
5593
|
+
const sentComment = useCallback46(
|
|
5588
5594
|
async ({ data }) => {
|
|
5589
5595
|
const jsonData = {
|
|
5590
5596
|
context: {
|
|
@@ -5612,7 +5618,7 @@ function useFormService() {
|
|
|
5612
5618
|
},
|
|
5613
5619
|
[env]
|
|
5614
5620
|
);
|
|
5615
|
-
const deleteComment =
|
|
5621
|
+
const deleteComment = useCallback46(
|
|
5616
5622
|
async ({ data }) => {
|
|
5617
5623
|
const jsonData = {
|
|
5618
5624
|
attachment_ids: [],
|
|
@@ -5628,7 +5634,7 @@ function useFormService() {
|
|
|
5628
5634
|
},
|
|
5629
5635
|
[env]
|
|
5630
5636
|
);
|
|
5631
|
-
const getImage =
|
|
5637
|
+
const getImage = useCallback46(
|
|
5632
5638
|
async ({ data }) => {
|
|
5633
5639
|
return env.requests.get(
|
|
5634
5640
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -5641,7 +5647,7 @@ function useFormService() {
|
|
|
5641
5647
|
},
|
|
5642
5648
|
[env]
|
|
5643
5649
|
);
|
|
5644
|
-
const uploadImage =
|
|
5650
|
+
const uploadImage = useCallback46(
|
|
5645
5651
|
async ({
|
|
5646
5652
|
formData,
|
|
5647
5653
|
service,
|
|
@@ -5660,7 +5666,7 @@ function useFormService() {
|
|
|
5660
5666
|
},
|
|
5661
5667
|
[env]
|
|
5662
5668
|
);
|
|
5663
|
-
const uploadFile =
|
|
5669
|
+
const uploadFile = useCallback46(
|
|
5664
5670
|
async ({
|
|
5665
5671
|
formData,
|
|
5666
5672
|
service,
|
|
@@ -5680,7 +5686,7 @@ function useFormService() {
|
|
|
5680
5686
|
},
|
|
5681
5687
|
[env]
|
|
5682
5688
|
);
|
|
5683
|
-
const getFormView =
|
|
5689
|
+
const getFormView = useCallback46(
|
|
5684
5690
|
async ({ data }) => {
|
|
5685
5691
|
const jsonData = {
|
|
5686
5692
|
model: data.model,
|
|
@@ -5696,7 +5702,7 @@ function useFormService() {
|
|
|
5696
5702
|
},
|
|
5697
5703
|
[env]
|
|
5698
5704
|
);
|
|
5699
|
-
const changeStatus =
|
|
5705
|
+
const changeStatus = useCallback46(
|
|
5700
5706
|
async ({ data }) => {
|
|
5701
5707
|
const vals = {
|
|
5702
5708
|
[data.name]: data.stage_id
|
|
@@ -5725,7 +5731,7 @@ function useFormService() {
|
|
|
5725
5731
|
},
|
|
5726
5732
|
[env]
|
|
5727
5733
|
);
|
|
5728
|
-
const getExternalTab =
|
|
5734
|
+
const getExternalTab = useCallback46(
|
|
5729
5735
|
async ({ method, context, service, xNode }) => {
|
|
5730
5736
|
return env?.requests?.post(
|
|
5731
5737
|
"/call" /* CALL_PATH */,
|
|
@@ -5760,10 +5766,10 @@ function useFormService() {
|
|
|
5760
5766
|
}
|
|
5761
5767
|
|
|
5762
5768
|
// src/services/kanban-service/index.ts
|
|
5763
|
-
import { useCallback as
|
|
5769
|
+
import { useCallback as useCallback47 } from "react";
|
|
5764
5770
|
function useKanbanService() {
|
|
5765
5771
|
const { env } = useEnv();
|
|
5766
|
-
const getGroups =
|
|
5772
|
+
const getGroups = useCallback47(
|
|
5767
5773
|
async ({ model, width_context }) => {
|
|
5768
5774
|
const jsonData = {
|
|
5769
5775
|
model,
|
|
@@ -5783,7 +5789,7 @@ function useKanbanService() {
|
|
|
5783
5789
|
},
|
|
5784
5790
|
[env]
|
|
5785
5791
|
);
|
|
5786
|
-
const getProgressBar =
|
|
5792
|
+
const getProgressBar = useCallback47(
|
|
5787
5793
|
async ({ field, color, model, width_context }) => {
|
|
5788
5794
|
const jsonData = {
|
|
5789
5795
|
model,
|
|
@@ -5813,10 +5819,10 @@ function useKanbanService() {
|
|
|
5813
5819
|
}
|
|
5814
5820
|
|
|
5815
5821
|
// src/services/model-service/index.ts
|
|
5816
|
-
import { useCallback as
|
|
5822
|
+
import { useCallback as useCallback48 } from "react";
|
|
5817
5823
|
function useModelService() {
|
|
5818
5824
|
const { env } = useEnv();
|
|
5819
|
-
const getListMyBankAccount =
|
|
5825
|
+
const getListMyBankAccount = useCallback48(
|
|
5820
5826
|
async ({
|
|
5821
5827
|
domain,
|
|
5822
5828
|
spectification,
|
|
@@ -5840,7 +5846,7 @@ function useModelService() {
|
|
|
5840
5846
|
},
|
|
5841
5847
|
[env]
|
|
5842
5848
|
);
|
|
5843
|
-
const getCurrency =
|
|
5849
|
+
const getCurrency = useCallback48(async () => {
|
|
5844
5850
|
const jsonData = {
|
|
5845
5851
|
model: "res.currency",
|
|
5846
5852
|
method: "web_search_read",
|
|
@@ -5860,7 +5866,7 @@ function useModelService() {
|
|
|
5860
5866
|
}
|
|
5861
5867
|
});
|
|
5862
5868
|
}, [env]);
|
|
5863
|
-
const getConversionRate =
|
|
5869
|
+
const getConversionRate = useCallback48(async () => {
|
|
5864
5870
|
const jsonData = {
|
|
5865
5871
|
model: "res.currency",
|
|
5866
5872
|
method: "web_search_read",
|
|
@@ -5886,7 +5892,7 @@ function useModelService() {
|
|
|
5886
5892
|
}
|
|
5887
5893
|
});
|
|
5888
5894
|
}, [env]);
|
|
5889
|
-
const getAll =
|
|
5895
|
+
const getAll = useCallback48(
|
|
5890
5896
|
async ({
|
|
5891
5897
|
data,
|
|
5892
5898
|
service,
|
|
@@ -5928,7 +5934,7 @@ function useModelService() {
|
|
|
5928
5934
|
},
|
|
5929
5935
|
[env]
|
|
5930
5936
|
);
|
|
5931
|
-
const getListCalendar =
|
|
5937
|
+
const getListCalendar = useCallback48(
|
|
5932
5938
|
async ({ data }) => {
|
|
5933
5939
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
5934
5940
|
fields: data.fields,
|
|
@@ -5959,7 +5965,7 @@ function useModelService() {
|
|
|
5959
5965
|
},
|
|
5960
5966
|
[env]
|
|
5961
5967
|
);
|
|
5962
|
-
const getList =
|
|
5968
|
+
const getList = useCallback48(
|
|
5963
5969
|
async ({
|
|
5964
5970
|
model,
|
|
5965
5971
|
ids = [],
|
|
@@ -5991,7 +5997,7 @@ function useModelService() {
|
|
|
5991
5997
|
},
|
|
5992
5998
|
[env]
|
|
5993
5999
|
);
|
|
5994
|
-
const getDetail =
|
|
6000
|
+
const getDetail = useCallback48(
|
|
5995
6001
|
async ({
|
|
5996
6002
|
ids = [],
|
|
5997
6003
|
model,
|
|
@@ -6023,7 +6029,7 @@ function useModelService() {
|
|
|
6023
6029
|
},
|
|
6024
6030
|
[env]
|
|
6025
6031
|
);
|
|
6026
|
-
const save =
|
|
6032
|
+
const save = useCallback48(
|
|
6027
6033
|
async ({
|
|
6028
6034
|
model,
|
|
6029
6035
|
ids = [],
|
|
@@ -6058,7 +6064,7 @@ function useModelService() {
|
|
|
6058
6064
|
},
|
|
6059
6065
|
[env]
|
|
6060
6066
|
);
|
|
6061
|
-
const deleteApi =
|
|
6067
|
+
const deleteApi = useCallback48(
|
|
6062
6068
|
async ({ ids = [], model, service }) => {
|
|
6063
6069
|
const jsonData = {
|
|
6064
6070
|
model,
|
|
@@ -6078,7 +6084,7 @@ function useModelService() {
|
|
|
6078
6084
|
},
|
|
6079
6085
|
[env]
|
|
6080
6086
|
);
|
|
6081
|
-
const onChange =
|
|
6087
|
+
const onChange = useCallback48(
|
|
6082
6088
|
async ({
|
|
6083
6089
|
ids = [],
|
|
6084
6090
|
model,
|
|
@@ -6114,7 +6120,7 @@ function useModelService() {
|
|
|
6114
6120
|
},
|
|
6115
6121
|
[env]
|
|
6116
6122
|
);
|
|
6117
|
-
const getListFieldsOnchange =
|
|
6123
|
+
const getListFieldsOnchange = useCallback48(
|
|
6118
6124
|
async ({
|
|
6119
6125
|
model,
|
|
6120
6126
|
service,
|
|
@@ -6138,7 +6144,7 @@ function useModelService() {
|
|
|
6138
6144
|
},
|
|
6139
6145
|
[env]
|
|
6140
6146
|
);
|
|
6141
|
-
const parseORMOdoo =
|
|
6147
|
+
const parseORMOdoo = useCallback48((data) => {
|
|
6142
6148
|
for (const key in data) {
|
|
6143
6149
|
if (key === "display_name") {
|
|
6144
6150
|
delete data[key];
|
|
@@ -6149,7 +6155,7 @@ function useModelService() {
|
|
|
6149
6155
|
}
|
|
6150
6156
|
return { ...data };
|
|
6151
6157
|
}, []);
|
|
6152
|
-
const toDataJS =
|
|
6158
|
+
const toDataJS = useCallback48(
|
|
6153
6159
|
(data, viewData, model) => {
|
|
6154
6160
|
for (const key in data) {
|
|
6155
6161
|
if (data[key] === false) {
|
|
@@ -6207,10 +6213,10 @@ function useModelService() {
|
|
|
6207
6213
|
}
|
|
6208
6214
|
|
|
6209
6215
|
// src/services/user-service/index.ts
|
|
6210
|
-
import { useCallback as
|
|
6216
|
+
import { useCallback as useCallback49 } from "react";
|
|
6211
6217
|
function useUserService() {
|
|
6212
6218
|
const { env } = useEnv();
|
|
6213
|
-
const getProfile =
|
|
6219
|
+
const getProfile = useCallback49(
|
|
6214
6220
|
async (service, path, extraHeaders) => {
|
|
6215
6221
|
return env?.requests?.get(
|
|
6216
6222
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6227,7 +6233,7 @@ function useUserService() {
|
|
|
6227
6233
|
},
|
|
6228
6234
|
[env]
|
|
6229
6235
|
);
|
|
6230
|
-
const getUser =
|
|
6236
|
+
const getUser = useCallback49(
|
|
6231
6237
|
async ({ context, id }) => {
|
|
6232
6238
|
const jsonData = {
|
|
6233
6239
|
model: "res.users",
|
|
@@ -6265,7 +6271,7 @@ function useUserService() {
|
|
|
6265
6271
|
},
|
|
6266
6272
|
[env]
|
|
6267
6273
|
);
|
|
6268
|
-
const switchUserLocale =
|
|
6274
|
+
const switchUserLocale = useCallback49(
|
|
6269
6275
|
async ({ id, values, service }) => {
|
|
6270
6276
|
const jsonData = {
|
|
6271
6277
|
model: "res.users",
|
|
@@ -6293,10 +6299,10 @@ function useUserService() {
|
|
|
6293
6299
|
}
|
|
6294
6300
|
|
|
6295
6301
|
// src/services/view-service/index.ts
|
|
6296
|
-
import { useCallback as
|
|
6302
|
+
import { useCallback as useCallback50 } from "react";
|
|
6297
6303
|
function useViewService() {
|
|
6298
6304
|
const { env } = useEnv();
|
|
6299
|
-
const getView =
|
|
6305
|
+
const getView = useCallback50(
|
|
6300
6306
|
async ({
|
|
6301
6307
|
model,
|
|
6302
6308
|
views,
|
|
@@ -6336,7 +6342,7 @@ function useViewService() {
|
|
|
6336
6342
|
},
|
|
6337
6343
|
[env]
|
|
6338
6344
|
);
|
|
6339
|
-
const getMenu =
|
|
6345
|
+
const getMenu = useCallback50(
|
|
6340
6346
|
async (context, specification, domain, service) => {
|
|
6341
6347
|
const jsonData = {
|
|
6342
6348
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6367,7 +6373,7 @@ function useViewService() {
|
|
|
6367
6373
|
},
|
|
6368
6374
|
[env]
|
|
6369
6375
|
);
|
|
6370
|
-
const getActionDetail =
|
|
6376
|
+
const getActionDetail = useCallback50(
|
|
6371
6377
|
async (aid, context) => {
|
|
6372
6378
|
const jsonData = {
|
|
6373
6379
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6397,7 +6403,7 @@ function useViewService() {
|
|
|
6397
6403
|
},
|
|
6398
6404
|
[env]
|
|
6399
6405
|
);
|
|
6400
|
-
const getResequence =
|
|
6406
|
+
const getResequence = useCallback50(
|
|
6401
6407
|
async ({
|
|
6402
6408
|
model,
|
|
6403
6409
|
ids,
|
|
@@ -6427,7 +6433,7 @@ function useViewService() {
|
|
|
6427
6433
|
},
|
|
6428
6434
|
[env]
|
|
6429
6435
|
);
|
|
6430
|
-
const getSelectionItem =
|
|
6436
|
+
const getSelectionItem = useCallback50(
|
|
6431
6437
|
async ({
|
|
6432
6438
|
data,
|
|
6433
6439
|
service,
|
|
@@ -6464,7 +6470,7 @@ function useViewService() {
|
|
|
6464
6470
|
},
|
|
6465
6471
|
[env]
|
|
6466
6472
|
);
|
|
6467
|
-
const loadMessages =
|
|
6473
|
+
const loadMessages = useCallback50(async () => {
|
|
6468
6474
|
return env.requests.post(
|
|
6469
6475
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6470
6476
|
{},
|
|
@@ -6475,14 +6481,14 @@ function useViewService() {
|
|
|
6475
6481
|
}
|
|
6476
6482
|
);
|
|
6477
6483
|
}, [env]);
|
|
6478
|
-
const getVersion =
|
|
6484
|
+
const getVersion = useCallback50(async () => {
|
|
6479
6485
|
return env?.requests?.get("", {
|
|
6480
6486
|
headers: {
|
|
6481
6487
|
"Content-Type": "application/json"
|
|
6482
6488
|
}
|
|
6483
6489
|
});
|
|
6484
6490
|
}, [env]);
|
|
6485
|
-
const grantAccess =
|
|
6491
|
+
const grantAccess = useCallback50(
|
|
6486
6492
|
async ({
|
|
6487
6493
|
redirect_uri,
|
|
6488
6494
|
state,
|
|
@@ -6509,7 +6515,7 @@ function useViewService() {
|
|
|
6509
6515
|
},
|
|
6510
6516
|
[env]
|
|
6511
6517
|
);
|
|
6512
|
-
const removeTotpSetUp =
|
|
6518
|
+
const removeTotpSetUp = useCallback50(
|
|
6513
6519
|
async ({ method, token }) => {
|
|
6514
6520
|
const jsonData = {
|
|
6515
6521
|
method,
|
|
@@ -6530,7 +6536,7 @@ function useViewService() {
|
|
|
6530
6536
|
},
|
|
6531
6537
|
[env]
|
|
6532
6538
|
);
|
|
6533
|
-
const requestSetupTotp =
|
|
6539
|
+
const requestSetupTotp = useCallback50(
|
|
6534
6540
|
async ({ method, token }) => {
|
|
6535
6541
|
const jsonData = {
|
|
6536
6542
|
method,
|
|
@@ -6549,7 +6555,7 @@ function useViewService() {
|
|
|
6549
6555
|
},
|
|
6550
6556
|
[env]
|
|
6551
6557
|
);
|
|
6552
|
-
const settingsWebRead2fa =
|
|
6558
|
+
const settingsWebRead2fa = useCallback50(
|
|
6553
6559
|
async ({
|
|
6554
6560
|
method,
|
|
6555
6561
|
model,
|
|
@@ -6577,7 +6583,7 @@ function useViewService() {
|
|
|
6577
6583
|
},
|
|
6578
6584
|
[env]
|
|
6579
6585
|
);
|
|
6580
|
-
const signInSSO =
|
|
6586
|
+
const signInSSO = useCallback50(
|
|
6581
6587
|
async ({
|
|
6582
6588
|
redirect_uri,
|
|
6583
6589
|
state,
|
|
@@ -6609,7 +6615,7 @@ function useViewService() {
|
|
|
6609
6615
|
},
|
|
6610
6616
|
[env]
|
|
6611
6617
|
);
|
|
6612
|
-
const verify2FA =
|
|
6618
|
+
const verify2FA = useCallback50(
|
|
6613
6619
|
({
|
|
6614
6620
|
method,
|
|
6615
6621
|
with_context,
|
|
@@ -6642,7 +6648,7 @@ function useViewService() {
|
|
|
6642
6648
|
},
|
|
6643
6649
|
[env]
|
|
6644
6650
|
);
|
|
6645
|
-
const get2FAMethods =
|
|
6651
|
+
const get2FAMethods = useCallback50(
|
|
6646
6652
|
({ method, with_context }) => {
|
|
6647
6653
|
const jsonData = {
|
|
6648
6654
|
method,
|
|
@@ -6661,7 +6667,7 @@ function useViewService() {
|
|
|
6661
6667
|
},
|
|
6662
6668
|
[env]
|
|
6663
6669
|
);
|
|
6664
|
-
const verifyTotp =
|
|
6670
|
+
const verifyTotp = useCallback50(
|
|
6665
6671
|
({
|
|
6666
6672
|
method,
|
|
6667
6673
|
action_token,
|
|
@@ -6686,7 +6692,7 @@ function useViewService() {
|
|
|
6686
6692
|
},
|
|
6687
6693
|
[env]
|
|
6688
6694
|
);
|
|
6689
|
-
const getNotifications =
|
|
6695
|
+
const getNotifications = useCallback50(
|
|
6690
6696
|
async ({
|
|
6691
6697
|
service,
|
|
6692
6698
|
xNode,
|
|
@@ -6706,7 +6712,7 @@ function useViewService() {
|
|
|
6706
6712
|
},
|
|
6707
6713
|
[env]
|
|
6708
6714
|
);
|
|
6709
|
-
const getCountry =
|
|
6715
|
+
const getCountry = useCallback50(
|
|
6710
6716
|
async ({
|
|
6711
6717
|
service,
|
|
6712
6718
|
xNode,
|
|
@@ -6733,7 +6739,7 @@ function useViewService() {
|
|
|
6733
6739
|
},
|
|
6734
6740
|
[env]
|
|
6735
6741
|
);
|
|
6736
|
-
const getCity =
|
|
6742
|
+
const getCity = useCallback50(
|
|
6737
6743
|
async ({
|
|
6738
6744
|
service,
|
|
6739
6745
|
xNode,
|
|
@@ -6760,7 +6766,7 @@ function useViewService() {
|
|
|
6760
6766
|
},
|
|
6761
6767
|
[env]
|
|
6762
6768
|
);
|
|
6763
|
-
const getWard =
|
|
6769
|
+
const getWard = useCallback50(
|
|
6764
6770
|
async ({
|
|
6765
6771
|
service,
|
|
6766
6772
|
xNode,
|
|
@@ -6785,7 +6791,7 @@ function useViewService() {
|
|
|
6785
6791
|
},
|
|
6786
6792
|
[env]
|
|
6787
6793
|
);
|
|
6788
|
-
const getPartnerTitle =
|
|
6794
|
+
const getPartnerTitle = useCallback50(
|
|
6789
6795
|
async ({
|
|
6790
6796
|
service,
|
|
6791
6797
|
xNode,
|
|
@@ -6837,10 +6843,10 @@ function useViewService() {
|
|
|
6837
6843
|
}
|
|
6838
6844
|
|
|
6839
6845
|
// src/services/dashboard-service/index.ts
|
|
6840
|
-
import { useCallback as
|
|
6846
|
+
import { useCallback as useCallback51 } from "react";
|
|
6841
6847
|
function useDashboardService() {
|
|
6842
6848
|
const { env } = useEnv();
|
|
6843
|
-
const readGroup =
|
|
6849
|
+
const readGroup = useCallback51(
|
|
6844
6850
|
async ({
|
|
6845
6851
|
service,
|
|
6846
6852
|
xNode,
|
|
@@ -6857,7 +6863,7 @@ function useDashboardService() {
|
|
|
6857
6863
|
},
|
|
6858
6864
|
[env]
|
|
6859
6865
|
);
|
|
6860
|
-
const getDataChart =
|
|
6866
|
+
const getDataChart = useCallback51(
|
|
6861
6867
|
async ({
|
|
6862
6868
|
service,
|
|
6863
6869
|
xNode,
|