@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.js
CHANGED
|
@@ -45,7 +45,7 @@ __export(services_exports, {
|
|
|
45
45
|
module.exports = __toCommonJS(services_exports);
|
|
46
46
|
|
|
47
47
|
// src/services/action-service/index.ts
|
|
48
|
-
var
|
|
48
|
+
var import_react48 = require("react");
|
|
49
49
|
|
|
50
50
|
// src/constants/api/uri-constant.ts
|
|
51
51
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -158,7 +158,7 @@ var MODEL_TO_TABLE = {
|
|
|
158
158
|
["loyalty.reward" /* LOYALTY_REWARD */]: "loyalty_rewards" /* LOYALTY_REWARDS */,
|
|
159
159
|
["pos.config" /* POS_CONFIG */]: "pos_configs" /* POS_CONFIGS */,
|
|
160
160
|
["pos.session" /* POS_SESSION */]: "pos_sessions" /* POS_SESSIONS */,
|
|
161
|
-
["pos.order.line" /* POS_ORDER_LINE */]: "
|
|
161
|
+
["pos.order.line" /* POS_ORDER_LINE */]: "order_line" /* ORDER_LINE */,
|
|
162
162
|
["pos.order" /* POS_ORDER */]: "orders" /* ORDERS */,
|
|
163
163
|
["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
|
|
164
164
|
["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
|
|
@@ -2955,7 +2955,7 @@ function useEnv() {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
|
|
2957
2957
|
// src/provider/service-provider.tsx
|
|
2958
|
-
var
|
|
2958
|
+
var import_react46 = require("react");
|
|
2959
2959
|
|
|
2960
2960
|
// src/hooks/auth/use-forgot-password.ts
|
|
2961
2961
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -4743,6 +4743,12 @@ var import_react_query115 = require("@tanstack/react-query");
|
|
|
4743
4743
|
// src/services/pos-service/supabase/create-order.ts
|
|
4744
4744
|
var import_react43 = require("react");
|
|
4745
4745
|
|
|
4746
|
+
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4747
|
+
var import_react44 = require("react");
|
|
4748
|
+
|
|
4749
|
+
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4750
|
+
var import_react45 = require("react");
|
|
4751
|
+
|
|
4746
4752
|
// src/hooks/pos/supabase/use-add-table.ts
|
|
4747
4753
|
var import_react_query116 = require("@tanstack/react-query");
|
|
4748
4754
|
|
|
@@ -4763,16 +4769,16 @@ var import_react_query121 = require("@tanstack/react-query");
|
|
|
4763
4769
|
|
|
4764
4770
|
// src/provider/service-provider.tsx
|
|
4765
4771
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
4766
|
-
var ServiceContext = (0,
|
|
4772
|
+
var ServiceContext = (0, import_react46.createContext)(null);
|
|
4767
4773
|
|
|
4768
4774
|
// src/provider/meta-provider.tsx
|
|
4769
|
-
var
|
|
4775
|
+
var import_react47 = require("react");
|
|
4770
4776
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
4771
4777
|
|
|
4772
4778
|
// src/services/action-service/index.ts
|
|
4773
4779
|
function useActionService() {
|
|
4774
4780
|
const { env } = useEnv();
|
|
4775
|
-
const loadAction = (0,
|
|
4781
|
+
const loadAction = (0, import_react48.useCallback)(
|
|
4776
4782
|
async ({
|
|
4777
4783
|
idAction,
|
|
4778
4784
|
context,
|
|
@@ -4796,7 +4802,7 @@ function useActionService() {
|
|
|
4796
4802
|
},
|
|
4797
4803
|
[env]
|
|
4798
4804
|
);
|
|
4799
|
-
const callButton = (0,
|
|
4805
|
+
const callButton = (0, import_react48.useCallback)(
|
|
4800
4806
|
async ({
|
|
4801
4807
|
model,
|
|
4802
4808
|
ids = [],
|
|
@@ -4830,7 +4836,7 @@ function useActionService() {
|
|
|
4830
4836
|
},
|
|
4831
4837
|
[env]
|
|
4832
4838
|
);
|
|
4833
|
-
const removeRows = (0,
|
|
4839
|
+
const removeRows = (0, import_react48.useCallback)(
|
|
4834
4840
|
async ({
|
|
4835
4841
|
model,
|
|
4836
4842
|
ids,
|
|
@@ -4856,7 +4862,7 @@ function useActionService() {
|
|
|
4856
4862
|
},
|
|
4857
4863
|
[env]
|
|
4858
4864
|
);
|
|
4859
|
-
const duplicateRecord = (0,
|
|
4865
|
+
const duplicateRecord = (0, import_react48.useCallback)(
|
|
4860
4866
|
async ({
|
|
4861
4867
|
model,
|
|
4862
4868
|
id,
|
|
@@ -4882,7 +4888,7 @@ function useActionService() {
|
|
|
4882
4888
|
},
|
|
4883
4889
|
[env]
|
|
4884
4890
|
);
|
|
4885
|
-
const getPrintReportName = (0,
|
|
4891
|
+
const getPrintReportName = (0, import_react48.useCallback)(
|
|
4886
4892
|
async ({ id }) => {
|
|
4887
4893
|
const jsonData = {
|
|
4888
4894
|
model: "ir.actions.report",
|
|
@@ -4900,7 +4906,7 @@ function useActionService() {
|
|
|
4900
4906
|
},
|
|
4901
4907
|
[env]
|
|
4902
4908
|
);
|
|
4903
|
-
const print = (0,
|
|
4909
|
+
const print = (0, import_react48.useCallback)(
|
|
4904
4910
|
async ({ id, report, db }) => {
|
|
4905
4911
|
const jsonData = {
|
|
4906
4912
|
report,
|
|
@@ -4918,7 +4924,7 @@ function useActionService() {
|
|
|
4918
4924
|
},
|
|
4919
4925
|
[env]
|
|
4920
4926
|
);
|
|
4921
|
-
const runAction = (0,
|
|
4927
|
+
const runAction = (0, import_react48.useCallback)(
|
|
4922
4928
|
async ({
|
|
4923
4929
|
idAction,
|
|
4924
4930
|
context,
|
|
@@ -4945,7 +4951,7 @@ function useActionService() {
|
|
|
4945
4951
|
},
|
|
4946
4952
|
[env]
|
|
4947
4953
|
);
|
|
4948
|
-
const generateSerialNumber = (0,
|
|
4954
|
+
const generateSerialNumber = (0, import_react48.useCallback)(
|
|
4949
4955
|
async ({
|
|
4950
4956
|
kwargs,
|
|
4951
4957
|
context,
|
|
@@ -4983,11 +4989,11 @@ function useActionService() {
|
|
|
4983
4989
|
}
|
|
4984
4990
|
|
|
4985
4991
|
// src/services/auth-service/index.ts
|
|
4986
|
-
var
|
|
4992
|
+
var import_react49 = require("react");
|
|
4987
4993
|
function useAuthService() {
|
|
4988
4994
|
const { env } = useEnv();
|
|
4989
4995
|
const supabase = useSupabaseOptional();
|
|
4990
|
-
const login = (0,
|
|
4996
|
+
const login = (0, import_react49.useCallback)(
|
|
4991
4997
|
async (body) => {
|
|
4992
4998
|
const payload = Object.fromEntries(
|
|
4993
4999
|
Object.entries({
|
|
@@ -5012,7 +5018,7 @@ function useAuthService() {
|
|
|
5012
5018
|
},
|
|
5013
5019
|
[env]
|
|
5014
5020
|
);
|
|
5015
|
-
const loginSupabase = (0,
|
|
5021
|
+
const loginSupabase = (0, import_react49.useCallback)(
|
|
5016
5022
|
async (body) => {
|
|
5017
5023
|
if (!supabase) {
|
|
5018
5024
|
return {
|
|
@@ -5028,7 +5034,7 @@ function useAuthService() {
|
|
|
5028
5034
|
},
|
|
5029
5035
|
[supabase]
|
|
5030
5036
|
);
|
|
5031
|
-
const forgotPassword = (0,
|
|
5037
|
+
const forgotPassword = (0, import_react49.useCallback)(
|
|
5032
5038
|
async (email) => {
|
|
5033
5039
|
const bodyData = {
|
|
5034
5040
|
login: email,
|
|
@@ -5042,7 +5048,7 @@ function useAuthService() {
|
|
|
5042
5048
|
},
|
|
5043
5049
|
[env]
|
|
5044
5050
|
);
|
|
5045
|
-
const forgotPasswordSSO = (0,
|
|
5051
|
+
const forgotPasswordSSO = (0, import_react49.useCallback)(
|
|
5046
5052
|
async ({
|
|
5047
5053
|
email,
|
|
5048
5054
|
with_context,
|
|
@@ -5065,7 +5071,7 @@ function useAuthService() {
|
|
|
5065
5071
|
},
|
|
5066
5072
|
[env]
|
|
5067
5073
|
);
|
|
5068
|
-
const resetPassword = (0,
|
|
5074
|
+
const resetPassword = (0, import_react49.useCallback)(
|
|
5069
5075
|
async (data, token) => {
|
|
5070
5076
|
const bodyData = {
|
|
5071
5077
|
token,
|
|
@@ -5080,7 +5086,7 @@ function useAuthService() {
|
|
|
5080
5086
|
},
|
|
5081
5087
|
[env]
|
|
5082
5088
|
);
|
|
5083
|
-
const resetPasswordSSO = (0,
|
|
5089
|
+
const resetPasswordSSO = (0, import_react49.useCallback)(
|
|
5084
5090
|
async ({
|
|
5085
5091
|
method,
|
|
5086
5092
|
password,
|
|
@@ -5103,7 +5109,7 @@ function useAuthService() {
|
|
|
5103
5109
|
},
|
|
5104
5110
|
[env]
|
|
5105
5111
|
);
|
|
5106
|
-
const updatePassword = (0,
|
|
5112
|
+
const updatePassword = (0, import_react49.useCallback)(
|
|
5107
5113
|
async (data, token) => {
|
|
5108
5114
|
const bodyData = {
|
|
5109
5115
|
token,
|
|
@@ -5118,7 +5124,7 @@ function useAuthService() {
|
|
|
5118
5124
|
},
|
|
5119
5125
|
[env]
|
|
5120
5126
|
);
|
|
5121
|
-
const isValidToken = (0,
|
|
5127
|
+
const isValidToken = (0, import_react49.useCallback)(
|
|
5122
5128
|
async (token) => {
|
|
5123
5129
|
const bodyData = {
|
|
5124
5130
|
token
|
|
@@ -5131,7 +5137,7 @@ function useAuthService() {
|
|
|
5131
5137
|
},
|
|
5132
5138
|
[env]
|
|
5133
5139
|
);
|
|
5134
|
-
const isValidActionToken = (0,
|
|
5140
|
+
const isValidActionToken = (0, import_react49.useCallback)(
|
|
5135
5141
|
async (actionToken) => {
|
|
5136
5142
|
const bodyData = {};
|
|
5137
5143
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5144,7 +5150,7 @@ function useAuthService() {
|
|
|
5144
5150
|
},
|
|
5145
5151
|
[env]
|
|
5146
5152
|
);
|
|
5147
|
-
const loginSocial = (0,
|
|
5153
|
+
const loginSocial = (0, import_react49.useCallback)(
|
|
5148
5154
|
async ({
|
|
5149
5155
|
db,
|
|
5150
5156
|
state,
|
|
@@ -5162,13 +5168,13 @@ function useAuthService() {
|
|
|
5162
5168
|
},
|
|
5163
5169
|
[env]
|
|
5164
5170
|
);
|
|
5165
|
-
const getProviders = (0,
|
|
5171
|
+
const getProviders = (0, import_react49.useCallback)(
|
|
5166
5172
|
async (db) => {
|
|
5167
5173
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5168
5174
|
},
|
|
5169
5175
|
[env]
|
|
5170
5176
|
);
|
|
5171
|
-
const getAccessByCode = (0,
|
|
5177
|
+
const getAccessByCode = (0, import_react49.useCallback)(
|
|
5172
5178
|
async (code) => {
|
|
5173
5179
|
const data = new URLSearchParams();
|
|
5174
5180
|
data.append("code", code);
|
|
@@ -5188,7 +5194,7 @@ function useAuthService() {
|
|
|
5188
5194
|
},
|
|
5189
5195
|
[env]
|
|
5190
5196
|
);
|
|
5191
|
-
const logout = (0,
|
|
5197
|
+
const logout = (0, import_react49.useCallback)(
|
|
5192
5198
|
async (service) => {
|
|
5193
5199
|
return env?.requests?.post(
|
|
5194
5200
|
"/logout" /* LOGOUT */,
|
|
@@ -5205,7 +5211,7 @@ function useAuthService() {
|
|
|
5205
5211
|
},
|
|
5206
5212
|
[env]
|
|
5207
5213
|
);
|
|
5208
|
-
const getTenantMapping = (0,
|
|
5214
|
+
const getTenantMapping = (0, import_react49.useCallback)(
|
|
5209
5215
|
async ({ shortName, service }) => {
|
|
5210
5216
|
const bodyData = {
|
|
5211
5217
|
short_name: shortName
|
|
@@ -5223,7 +5229,7 @@ function useAuthService() {
|
|
|
5223
5229
|
},
|
|
5224
5230
|
[env]
|
|
5225
5231
|
);
|
|
5226
|
-
const getToken = (0,
|
|
5232
|
+
const getToken = (0, import_react49.useCallback)(
|
|
5227
5233
|
async ({
|
|
5228
5234
|
phone,
|
|
5229
5235
|
name,
|
|
@@ -5268,10 +5274,10 @@ function useAuthService() {
|
|
|
5268
5274
|
}
|
|
5269
5275
|
|
|
5270
5276
|
// src/services/company-service/index.ts
|
|
5271
|
-
var
|
|
5277
|
+
var import_react50 = require("react");
|
|
5272
5278
|
function useCompanyService() {
|
|
5273
5279
|
const { env } = useEnv();
|
|
5274
|
-
const getCurrentCompany = (0,
|
|
5280
|
+
const getCurrentCompany = (0, import_react50.useCallback)(
|
|
5275
5281
|
async (service, extraHeaders) => {
|
|
5276
5282
|
return await env.requests.get(
|
|
5277
5283
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5288,7 +5294,7 @@ function useCompanyService() {
|
|
|
5288
5294
|
},
|
|
5289
5295
|
[env]
|
|
5290
5296
|
);
|
|
5291
|
-
const getInfoCompany = (0,
|
|
5297
|
+
const getInfoCompany = (0, import_react50.useCallback)(
|
|
5292
5298
|
async (id, service) => {
|
|
5293
5299
|
const jsonData = {
|
|
5294
5300
|
ids: [id],
|
|
@@ -5324,10 +5330,10 @@ function useCompanyService() {
|
|
|
5324
5330
|
}
|
|
5325
5331
|
|
|
5326
5332
|
// src/services/excel-service/index.ts
|
|
5327
|
-
var
|
|
5333
|
+
var import_react51 = require("react");
|
|
5328
5334
|
function useExcelService() {
|
|
5329
5335
|
const { env } = useEnv();
|
|
5330
|
-
const uploadFileExcel = (0,
|
|
5336
|
+
const uploadFileExcel = (0, import_react51.useCallback)(
|
|
5331
5337
|
async ({
|
|
5332
5338
|
formData,
|
|
5333
5339
|
service,
|
|
@@ -5344,7 +5350,7 @@ function useExcelService() {
|
|
|
5344
5350
|
},
|
|
5345
5351
|
[env]
|
|
5346
5352
|
);
|
|
5347
|
-
const uploadIdFile = (0,
|
|
5353
|
+
const uploadIdFile = (0, import_react51.useCallback)(
|
|
5348
5354
|
async ({
|
|
5349
5355
|
formData,
|
|
5350
5356
|
service,
|
|
@@ -5361,7 +5367,7 @@ function useExcelService() {
|
|
|
5361
5367
|
},
|
|
5362
5368
|
[env]
|
|
5363
5369
|
);
|
|
5364
|
-
const parsePreview = (0,
|
|
5370
|
+
const parsePreview = (0, import_react51.useCallback)(
|
|
5365
5371
|
async ({
|
|
5366
5372
|
id,
|
|
5367
5373
|
selectedSheet,
|
|
@@ -5410,7 +5416,7 @@ function useExcelService() {
|
|
|
5410
5416
|
},
|
|
5411
5417
|
[env]
|
|
5412
5418
|
);
|
|
5413
|
-
const executeImport = (0,
|
|
5419
|
+
const executeImport = (0, import_react51.useCallback)(
|
|
5414
5420
|
async ({
|
|
5415
5421
|
columns,
|
|
5416
5422
|
fields,
|
|
@@ -5444,7 +5450,7 @@ function useExcelService() {
|
|
|
5444
5450
|
},
|
|
5445
5451
|
[env]
|
|
5446
5452
|
);
|
|
5447
|
-
const getFileExcel = (0,
|
|
5453
|
+
const getFileExcel = (0, import_react51.useCallback)(
|
|
5448
5454
|
async ({
|
|
5449
5455
|
model,
|
|
5450
5456
|
service,
|
|
@@ -5468,7 +5474,7 @@ function useExcelService() {
|
|
|
5468
5474
|
},
|
|
5469
5475
|
[env]
|
|
5470
5476
|
);
|
|
5471
|
-
const getFieldExport = (0,
|
|
5477
|
+
const getFieldExport = (0, import_react51.useCallback)(
|
|
5472
5478
|
async ({
|
|
5473
5479
|
ids,
|
|
5474
5480
|
model,
|
|
@@ -5508,7 +5514,7 @@ function useExcelService() {
|
|
|
5508
5514
|
},
|
|
5509
5515
|
[env]
|
|
5510
5516
|
);
|
|
5511
|
-
const exportExcel = (0,
|
|
5517
|
+
const exportExcel = (0, import_react51.useCallback)(
|
|
5512
5518
|
async ({
|
|
5513
5519
|
model,
|
|
5514
5520
|
domain,
|
|
@@ -5556,10 +5562,10 @@ function useExcelService() {
|
|
|
5556
5562
|
}
|
|
5557
5563
|
|
|
5558
5564
|
// src/services/form-service/index.ts
|
|
5559
|
-
var
|
|
5565
|
+
var import_react52 = require("react");
|
|
5560
5566
|
function useFormService() {
|
|
5561
5567
|
const { env } = useEnv();
|
|
5562
|
-
const getComment = (0,
|
|
5568
|
+
const getComment = (0, import_react52.useCallback)(
|
|
5563
5569
|
async ({ data }) => {
|
|
5564
5570
|
const jsonData = {
|
|
5565
5571
|
thread_id: data.thread_id,
|
|
@@ -5577,7 +5583,7 @@ function useFormService() {
|
|
|
5577
5583
|
},
|
|
5578
5584
|
[env]
|
|
5579
5585
|
);
|
|
5580
|
-
const getThreadData = (0,
|
|
5586
|
+
const getThreadData = (0, import_react52.useCallback)(
|
|
5581
5587
|
async ({
|
|
5582
5588
|
data,
|
|
5583
5589
|
xNode,
|
|
@@ -5604,7 +5610,7 @@ function useFormService() {
|
|
|
5604
5610
|
},
|
|
5605
5611
|
[env]
|
|
5606
5612
|
);
|
|
5607
|
-
const getThreadMessages = (0,
|
|
5613
|
+
const getThreadMessages = (0, import_react52.useCallback)(
|
|
5608
5614
|
async ({
|
|
5609
5615
|
data,
|
|
5610
5616
|
xNode,
|
|
@@ -5630,7 +5636,7 @@ function useFormService() {
|
|
|
5630
5636
|
},
|
|
5631
5637
|
[env]
|
|
5632
5638
|
);
|
|
5633
|
-
const sentComment = (0,
|
|
5639
|
+
const sentComment = (0, import_react52.useCallback)(
|
|
5634
5640
|
async ({ data }) => {
|
|
5635
5641
|
const jsonData = {
|
|
5636
5642
|
context: {
|
|
@@ -5658,7 +5664,7 @@ function useFormService() {
|
|
|
5658
5664
|
},
|
|
5659
5665
|
[env]
|
|
5660
5666
|
);
|
|
5661
|
-
const deleteComment = (0,
|
|
5667
|
+
const deleteComment = (0, import_react52.useCallback)(
|
|
5662
5668
|
async ({ data }) => {
|
|
5663
5669
|
const jsonData = {
|
|
5664
5670
|
attachment_ids: [],
|
|
@@ -5674,7 +5680,7 @@ function useFormService() {
|
|
|
5674
5680
|
},
|
|
5675
5681
|
[env]
|
|
5676
5682
|
);
|
|
5677
|
-
const getImage = (0,
|
|
5683
|
+
const getImage = (0, import_react52.useCallback)(
|
|
5678
5684
|
async ({ data }) => {
|
|
5679
5685
|
return env.requests.get(
|
|
5680
5686
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -5687,7 +5693,7 @@ function useFormService() {
|
|
|
5687
5693
|
},
|
|
5688
5694
|
[env]
|
|
5689
5695
|
);
|
|
5690
|
-
const uploadImage = (0,
|
|
5696
|
+
const uploadImage = (0, import_react52.useCallback)(
|
|
5691
5697
|
async ({
|
|
5692
5698
|
formData,
|
|
5693
5699
|
service,
|
|
@@ -5706,7 +5712,7 @@ function useFormService() {
|
|
|
5706
5712
|
},
|
|
5707
5713
|
[env]
|
|
5708
5714
|
);
|
|
5709
|
-
const uploadFile = (0,
|
|
5715
|
+
const uploadFile = (0, import_react52.useCallback)(
|
|
5710
5716
|
async ({
|
|
5711
5717
|
formData,
|
|
5712
5718
|
service,
|
|
@@ -5726,7 +5732,7 @@ function useFormService() {
|
|
|
5726
5732
|
},
|
|
5727
5733
|
[env]
|
|
5728
5734
|
);
|
|
5729
|
-
const getFormView = (0,
|
|
5735
|
+
const getFormView = (0, import_react52.useCallback)(
|
|
5730
5736
|
async ({ data }) => {
|
|
5731
5737
|
const jsonData = {
|
|
5732
5738
|
model: data.model,
|
|
@@ -5742,7 +5748,7 @@ function useFormService() {
|
|
|
5742
5748
|
},
|
|
5743
5749
|
[env]
|
|
5744
5750
|
);
|
|
5745
|
-
const changeStatus = (0,
|
|
5751
|
+
const changeStatus = (0, import_react52.useCallback)(
|
|
5746
5752
|
async ({ data }) => {
|
|
5747
5753
|
const vals = {
|
|
5748
5754
|
[data.name]: data.stage_id
|
|
@@ -5771,7 +5777,7 @@ function useFormService() {
|
|
|
5771
5777
|
},
|
|
5772
5778
|
[env]
|
|
5773
5779
|
);
|
|
5774
|
-
const getExternalTab = (0,
|
|
5780
|
+
const getExternalTab = (0, import_react52.useCallback)(
|
|
5775
5781
|
async ({ method, context, service, xNode }) => {
|
|
5776
5782
|
return env?.requests?.post(
|
|
5777
5783
|
"/call" /* CALL_PATH */,
|
|
@@ -5806,10 +5812,10 @@ function useFormService() {
|
|
|
5806
5812
|
}
|
|
5807
5813
|
|
|
5808
5814
|
// src/services/kanban-service/index.ts
|
|
5809
|
-
var
|
|
5815
|
+
var import_react53 = require("react");
|
|
5810
5816
|
function useKanbanService() {
|
|
5811
5817
|
const { env } = useEnv();
|
|
5812
|
-
const getGroups = (0,
|
|
5818
|
+
const getGroups = (0, import_react53.useCallback)(
|
|
5813
5819
|
async ({ model, width_context }) => {
|
|
5814
5820
|
const jsonData = {
|
|
5815
5821
|
model,
|
|
@@ -5829,7 +5835,7 @@ function useKanbanService() {
|
|
|
5829
5835
|
},
|
|
5830
5836
|
[env]
|
|
5831
5837
|
);
|
|
5832
|
-
const getProgressBar = (0,
|
|
5838
|
+
const getProgressBar = (0, import_react53.useCallback)(
|
|
5833
5839
|
async ({ field, color, model, width_context }) => {
|
|
5834
5840
|
const jsonData = {
|
|
5835
5841
|
model,
|
|
@@ -5859,10 +5865,10 @@ function useKanbanService() {
|
|
|
5859
5865
|
}
|
|
5860
5866
|
|
|
5861
5867
|
// src/services/model-service/index.ts
|
|
5862
|
-
var
|
|
5868
|
+
var import_react54 = require("react");
|
|
5863
5869
|
function useModelService() {
|
|
5864
5870
|
const { env } = useEnv();
|
|
5865
|
-
const getListMyBankAccount = (0,
|
|
5871
|
+
const getListMyBankAccount = (0, import_react54.useCallback)(
|
|
5866
5872
|
async ({
|
|
5867
5873
|
domain,
|
|
5868
5874
|
spectification,
|
|
@@ -5886,7 +5892,7 @@ function useModelService() {
|
|
|
5886
5892
|
},
|
|
5887
5893
|
[env]
|
|
5888
5894
|
);
|
|
5889
|
-
const getCurrency = (0,
|
|
5895
|
+
const getCurrency = (0, import_react54.useCallback)(async () => {
|
|
5890
5896
|
const jsonData = {
|
|
5891
5897
|
model: "res.currency",
|
|
5892
5898
|
method: "web_search_read",
|
|
@@ -5906,7 +5912,7 @@ function useModelService() {
|
|
|
5906
5912
|
}
|
|
5907
5913
|
});
|
|
5908
5914
|
}, [env]);
|
|
5909
|
-
const getConversionRate = (0,
|
|
5915
|
+
const getConversionRate = (0, import_react54.useCallback)(async () => {
|
|
5910
5916
|
const jsonData = {
|
|
5911
5917
|
model: "res.currency",
|
|
5912
5918
|
method: "web_search_read",
|
|
@@ -5932,7 +5938,7 @@ function useModelService() {
|
|
|
5932
5938
|
}
|
|
5933
5939
|
});
|
|
5934
5940
|
}, [env]);
|
|
5935
|
-
const getAll = (0,
|
|
5941
|
+
const getAll = (0, import_react54.useCallback)(
|
|
5936
5942
|
async ({
|
|
5937
5943
|
data,
|
|
5938
5944
|
service,
|
|
@@ -5974,7 +5980,7 @@ function useModelService() {
|
|
|
5974
5980
|
},
|
|
5975
5981
|
[env]
|
|
5976
5982
|
);
|
|
5977
|
-
const getListCalendar = (0,
|
|
5983
|
+
const getListCalendar = (0, import_react54.useCallback)(
|
|
5978
5984
|
async ({ data }) => {
|
|
5979
5985
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
5980
5986
|
fields: data.fields,
|
|
@@ -6005,7 +6011,7 @@ function useModelService() {
|
|
|
6005
6011
|
},
|
|
6006
6012
|
[env]
|
|
6007
6013
|
);
|
|
6008
|
-
const getList = (0,
|
|
6014
|
+
const getList = (0, import_react54.useCallback)(
|
|
6009
6015
|
async ({
|
|
6010
6016
|
model,
|
|
6011
6017
|
ids = [],
|
|
@@ -6037,7 +6043,7 @@ function useModelService() {
|
|
|
6037
6043
|
},
|
|
6038
6044
|
[env]
|
|
6039
6045
|
);
|
|
6040
|
-
const getDetail = (0,
|
|
6046
|
+
const getDetail = (0, import_react54.useCallback)(
|
|
6041
6047
|
async ({
|
|
6042
6048
|
ids = [],
|
|
6043
6049
|
model,
|
|
@@ -6069,7 +6075,7 @@ function useModelService() {
|
|
|
6069
6075
|
},
|
|
6070
6076
|
[env]
|
|
6071
6077
|
);
|
|
6072
|
-
const save = (0,
|
|
6078
|
+
const save = (0, import_react54.useCallback)(
|
|
6073
6079
|
async ({
|
|
6074
6080
|
model,
|
|
6075
6081
|
ids = [],
|
|
@@ -6104,7 +6110,7 @@ function useModelService() {
|
|
|
6104
6110
|
},
|
|
6105
6111
|
[env]
|
|
6106
6112
|
);
|
|
6107
|
-
const deleteApi = (0,
|
|
6113
|
+
const deleteApi = (0, import_react54.useCallback)(
|
|
6108
6114
|
async ({ ids = [], model, service }) => {
|
|
6109
6115
|
const jsonData = {
|
|
6110
6116
|
model,
|
|
@@ -6124,7 +6130,7 @@ function useModelService() {
|
|
|
6124
6130
|
},
|
|
6125
6131
|
[env]
|
|
6126
6132
|
);
|
|
6127
|
-
const onChange = (0,
|
|
6133
|
+
const onChange = (0, import_react54.useCallback)(
|
|
6128
6134
|
async ({
|
|
6129
6135
|
ids = [],
|
|
6130
6136
|
model,
|
|
@@ -6160,7 +6166,7 @@ function useModelService() {
|
|
|
6160
6166
|
},
|
|
6161
6167
|
[env]
|
|
6162
6168
|
);
|
|
6163
|
-
const getListFieldsOnchange = (0,
|
|
6169
|
+
const getListFieldsOnchange = (0, import_react54.useCallback)(
|
|
6164
6170
|
async ({
|
|
6165
6171
|
model,
|
|
6166
6172
|
service,
|
|
@@ -6184,7 +6190,7 @@ function useModelService() {
|
|
|
6184
6190
|
},
|
|
6185
6191
|
[env]
|
|
6186
6192
|
);
|
|
6187
|
-
const parseORMOdoo = (0,
|
|
6193
|
+
const parseORMOdoo = (0, import_react54.useCallback)((data) => {
|
|
6188
6194
|
for (const key in data) {
|
|
6189
6195
|
if (key === "display_name") {
|
|
6190
6196
|
delete data[key];
|
|
@@ -6195,7 +6201,7 @@ function useModelService() {
|
|
|
6195
6201
|
}
|
|
6196
6202
|
return { ...data };
|
|
6197
6203
|
}, []);
|
|
6198
|
-
const toDataJS = (0,
|
|
6204
|
+
const toDataJS = (0, import_react54.useCallback)(
|
|
6199
6205
|
(data, viewData, model) => {
|
|
6200
6206
|
for (const key in data) {
|
|
6201
6207
|
if (data[key] === false) {
|
|
@@ -6253,10 +6259,10 @@ function useModelService() {
|
|
|
6253
6259
|
}
|
|
6254
6260
|
|
|
6255
6261
|
// src/services/user-service/index.ts
|
|
6256
|
-
var
|
|
6262
|
+
var import_react55 = require("react");
|
|
6257
6263
|
function useUserService() {
|
|
6258
6264
|
const { env } = useEnv();
|
|
6259
|
-
const getProfile = (0,
|
|
6265
|
+
const getProfile = (0, import_react55.useCallback)(
|
|
6260
6266
|
async (service, path, extraHeaders) => {
|
|
6261
6267
|
return env?.requests?.get(
|
|
6262
6268
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6273,7 +6279,7 @@ function useUserService() {
|
|
|
6273
6279
|
},
|
|
6274
6280
|
[env]
|
|
6275
6281
|
);
|
|
6276
|
-
const getUser = (0,
|
|
6282
|
+
const getUser = (0, import_react55.useCallback)(
|
|
6277
6283
|
async ({ context, id }) => {
|
|
6278
6284
|
const jsonData = {
|
|
6279
6285
|
model: "res.users",
|
|
@@ -6311,7 +6317,7 @@ function useUserService() {
|
|
|
6311
6317
|
},
|
|
6312
6318
|
[env]
|
|
6313
6319
|
);
|
|
6314
|
-
const switchUserLocale = (0,
|
|
6320
|
+
const switchUserLocale = (0, import_react55.useCallback)(
|
|
6315
6321
|
async ({ id, values, service }) => {
|
|
6316
6322
|
const jsonData = {
|
|
6317
6323
|
model: "res.users",
|
|
@@ -6339,10 +6345,10 @@ function useUserService() {
|
|
|
6339
6345
|
}
|
|
6340
6346
|
|
|
6341
6347
|
// src/services/view-service/index.ts
|
|
6342
|
-
var
|
|
6348
|
+
var import_react56 = require("react");
|
|
6343
6349
|
function useViewService() {
|
|
6344
6350
|
const { env } = useEnv();
|
|
6345
|
-
const getView = (0,
|
|
6351
|
+
const getView = (0, import_react56.useCallback)(
|
|
6346
6352
|
async ({
|
|
6347
6353
|
model,
|
|
6348
6354
|
views,
|
|
@@ -6382,7 +6388,7 @@ function useViewService() {
|
|
|
6382
6388
|
},
|
|
6383
6389
|
[env]
|
|
6384
6390
|
);
|
|
6385
|
-
const getMenu = (0,
|
|
6391
|
+
const getMenu = (0, import_react56.useCallback)(
|
|
6386
6392
|
async (context, specification, domain, service) => {
|
|
6387
6393
|
const jsonData = {
|
|
6388
6394
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6413,7 +6419,7 @@ function useViewService() {
|
|
|
6413
6419
|
},
|
|
6414
6420
|
[env]
|
|
6415
6421
|
);
|
|
6416
|
-
const getActionDetail = (0,
|
|
6422
|
+
const getActionDetail = (0, import_react56.useCallback)(
|
|
6417
6423
|
async (aid, context) => {
|
|
6418
6424
|
const jsonData = {
|
|
6419
6425
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6443,7 +6449,7 @@ function useViewService() {
|
|
|
6443
6449
|
},
|
|
6444
6450
|
[env]
|
|
6445
6451
|
);
|
|
6446
|
-
const getResequence = (0,
|
|
6452
|
+
const getResequence = (0, import_react56.useCallback)(
|
|
6447
6453
|
async ({
|
|
6448
6454
|
model,
|
|
6449
6455
|
ids,
|
|
@@ -6473,7 +6479,7 @@ function useViewService() {
|
|
|
6473
6479
|
},
|
|
6474
6480
|
[env]
|
|
6475
6481
|
);
|
|
6476
|
-
const getSelectionItem = (0,
|
|
6482
|
+
const getSelectionItem = (0, import_react56.useCallback)(
|
|
6477
6483
|
async ({
|
|
6478
6484
|
data,
|
|
6479
6485
|
service,
|
|
@@ -6510,7 +6516,7 @@ function useViewService() {
|
|
|
6510
6516
|
},
|
|
6511
6517
|
[env]
|
|
6512
6518
|
);
|
|
6513
|
-
const loadMessages = (0,
|
|
6519
|
+
const loadMessages = (0, import_react56.useCallback)(async () => {
|
|
6514
6520
|
return env.requests.post(
|
|
6515
6521
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6516
6522
|
{},
|
|
@@ -6521,14 +6527,14 @@ function useViewService() {
|
|
|
6521
6527
|
}
|
|
6522
6528
|
);
|
|
6523
6529
|
}, [env]);
|
|
6524
|
-
const getVersion = (0,
|
|
6530
|
+
const getVersion = (0, import_react56.useCallback)(async () => {
|
|
6525
6531
|
return env?.requests?.get("", {
|
|
6526
6532
|
headers: {
|
|
6527
6533
|
"Content-Type": "application/json"
|
|
6528
6534
|
}
|
|
6529
6535
|
});
|
|
6530
6536
|
}, [env]);
|
|
6531
|
-
const grantAccess = (0,
|
|
6537
|
+
const grantAccess = (0, import_react56.useCallback)(
|
|
6532
6538
|
async ({
|
|
6533
6539
|
redirect_uri,
|
|
6534
6540
|
state,
|
|
@@ -6555,7 +6561,7 @@ function useViewService() {
|
|
|
6555
6561
|
},
|
|
6556
6562
|
[env]
|
|
6557
6563
|
);
|
|
6558
|
-
const removeTotpSetUp = (0,
|
|
6564
|
+
const removeTotpSetUp = (0, import_react56.useCallback)(
|
|
6559
6565
|
async ({ method, token }) => {
|
|
6560
6566
|
const jsonData = {
|
|
6561
6567
|
method,
|
|
@@ -6576,7 +6582,7 @@ function useViewService() {
|
|
|
6576
6582
|
},
|
|
6577
6583
|
[env]
|
|
6578
6584
|
);
|
|
6579
|
-
const requestSetupTotp = (0,
|
|
6585
|
+
const requestSetupTotp = (0, import_react56.useCallback)(
|
|
6580
6586
|
async ({ method, token }) => {
|
|
6581
6587
|
const jsonData = {
|
|
6582
6588
|
method,
|
|
@@ -6595,7 +6601,7 @@ function useViewService() {
|
|
|
6595
6601
|
},
|
|
6596
6602
|
[env]
|
|
6597
6603
|
);
|
|
6598
|
-
const settingsWebRead2fa = (0,
|
|
6604
|
+
const settingsWebRead2fa = (0, import_react56.useCallback)(
|
|
6599
6605
|
async ({
|
|
6600
6606
|
method,
|
|
6601
6607
|
model,
|
|
@@ -6623,7 +6629,7 @@ function useViewService() {
|
|
|
6623
6629
|
},
|
|
6624
6630
|
[env]
|
|
6625
6631
|
);
|
|
6626
|
-
const signInSSO = (0,
|
|
6632
|
+
const signInSSO = (0, import_react56.useCallback)(
|
|
6627
6633
|
async ({
|
|
6628
6634
|
redirect_uri,
|
|
6629
6635
|
state,
|
|
@@ -6655,7 +6661,7 @@ function useViewService() {
|
|
|
6655
6661
|
},
|
|
6656
6662
|
[env]
|
|
6657
6663
|
);
|
|
6658
|
-
const verify2FA = (0,
|
|
6664
|
+
const verify2FA = (0, import_react56.useCallback)(
|
|
6659
6665
|
({
|
|
6660
6666
|
method,
|
|
6661
6667
|
with_context,
|
|
@@ -6688,7 +6694,7 @@ function useViewService() {
|
|
|
6688
6694
|
},
|
|
6689
6695
|
[env]
|
|
6690
6696
|
);
|
|
6691
|
-
const get2FAMethods = (0,
|
|
6697
|
+
const get2FAMethods = (0, import_react56.useCallback)(
|
|
6692
6698
|
({ method, with_context }) => {
|
|
6693
6699
|
const jsonData = {
|
|
6694
6700
|
method,
|
|
@@ -6707,7 +6713,7 @@ function useViewService() {
|
|
|
6707
6713
|
},
|
|
6708
6714
|
[env]
|
|
6709
6715
|
);
|
|
6710
|
-
const verifyTotp = (0,
|
|
6716
|
+
const verifyTotp = (0, import_react56.useCallback)(
|
|
6711
6717
|
({
|
|
6712
6718
|
method,
|
|
6713
6719
|
action_token,
|
|
@@ -6732,7 +6738,7 @@ function useViewService() {
|
|
|
6732
6738
|
},
|
|
6733
6739
|
[env]
|
|
6734
6740
|
);
|
|
6735
|
-
const getNotifications = (0,
|
|
6741
|
+
const getNotifications = (0, import_react56.useCallback)(
|
|
6736
6742
|
async ({
|
|
6737
6743
|
service,
|
|
6738
6744
|
xNode,
|
|
@@ -6752,7 +6758,7 @@ function useViewService() {
|
|
|
6752
6758
|
},
|
|
6753
6759
|
[env]
|
|
6754
6760
|
);
|
|
6755
|
-
const getCountry = (0,
|
|
6761
|
+
const getCountry = (0, import_react56.useCallback)(
|
|
6756
6762
|
async ({
|
|
6757
6763
|
service,
|
|
6758
6764
|
xNode,
|
|
@@ -6779,7 +6785,7 @@ function useViewService() {
|
|
|
6779
6785
|
},
|
|
6780
6786
|
[env]
|
|
6781
6787
|
);
|
|
6782
|
-
const getCity = (0,
|
|
6788
|
+
const getCity = (0, import_react56.useCallback)(
|
|
6783
6789
|
async ({
|
|
6784
6790
|
service,
|
|
6785
6791
|
xNode,
|
|
@@ -6806,7 +6812,7 @@ function useViewService() {
|
|
|
6806
6812
|
},
|
|
6807
6813
|
[env]
|
|
6808
6814
|
);
|
|
6809
|
-
const getWard = (0,
|
|
6815
|
+
const getWard = (0, import_react56.useCallback)(
|
|
6810
6816
|
async ({
|
|
6811
6817
|
service,
|
|
6812
6818
|
xNode,
|
|
@@ -6831,7 +6837,7 @@ function useViewService() {
|
|
|
6831
6837
|
},
|
|
6832
6838
|
[env]
|
|
6833
6839
|
);
|
|
6834
|
-
const getPartnerTitle = (0,
|
|
6840
|
+
const getPartnerTitle = (0, import_react56.useCallback)(
|
|
6835
6841
|
async ({
|
|
6836
6842
|
service,
|
|
6837
6843
|
xNode,
|
|
@@ -6883,10 +6889,10 @@ function useViewService() {
|
|
|
6883
6889
|
}
|
|
6884
6890
|
|
|
6885
6891
|
// src/services/dashboard-service/index.ts
|
|
6886
|
-
var
|
|
6892
|
+
var import_react57 = require("react");
|
|
6887
6893
|
function useDashboardService() {
|
|
6888
6894
|
const { env } = useEnv();
|
|
6889
|
-
const readGroup = (0,
|
|
6895
|
+
const readGroup = (0, import_react57.useCallback)(
|
|
6890
6896
|
async ({
|
|
6891
6897
|
service,
|
|
6892
6898
|
xNode,
|
|
@@ -6903,7 +6909,7 @@ function useDashboardService() {
|
|
|
6903
6909
|
},
|
|
6904
6910
|
[env]
|
|
6905
6911
|
);
|
|
6906
|
-
const getDataChart = (0,
|
|
6912
|
+
const getDataChart = (0, import_react57.useCallback)(
|
|
6907
6913
|
async ({
|
|
6908
6914
|
service,
|
|
6909
6915
|
xNode,
|