@fctc/interface-logic 4.9.7 → 4.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.mts +5 -1
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +11 -1
- package/dist/constants.mjs +11 -1
- package/dist/hooks.d.mts +15 -1
- package/dist/hooks.d.ts +15 -1
- package/dist/hooks.js +128 -4
- package/dist/hooks.mjs +125 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +134 -4
- package/dist/index.mjs +131 -4
- package/dist/provider.d.mts +4 -1
- package/dist/provider.d.ts +4 -1
- package/dist/provider.js +146 -25
- package/dist/provider.mjs +135 -14
- package/dist/services.d.mts +14 -0
- package/dist/services.d.ts +14 -0
- package/dist/services.js +196 -99
- package/dist/services.mjs +193 -96
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// src/services/action-service/index.ts
|
|
2
|
-
import { useCallback as
|
|
2
|
+
import { useCallback as useCallback59 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
6
6
|
UriConstants2["AUTH_TOKEN_PATH"] = "/authentication/oauth2/token";
|
|
7
7
|
UriConstants2["GENTOKEN_SOCIAL"] = "/token/generate";
|
|
8
8
|
UriConstants2["CALL_PATH"] = "/call";
|
|
9
|
+
UriConstants2["SUPABASE_CALL_PATH"] = "/api/v2/call";
|
|
9
10
|
UriConstants2["COMPANY_PATH"] = "/company";
|
|
10
11
|
UriConstants2["PROFILE_PATH"] = "/userinfo";
|
|
11
12
|
UriConstants2["RESET_PASSWORD_PATH"] = "/reset_password";
|
|
@@ -120,9 +121,15 @@ var MODEL_TO_TABLE = {
|
|
|
120
121
|
["pos.payment.method" /* POS_PAYMENT_METHOD */]: "payment_methods" /* PAYMENT_METHODS */,
|
|
121
122
|
["pos.payment" /* POS_PAYMENT */]: "payments" /* PAYMENTS */,
|
|
122
123
|
["pos.category" /* POS_CATEGORY */]: "pos_categories" /* POS_CATEGORIES */,
|
|
124
|
+
["product.attribute" /* PRODUCT_ATTRIBUTE */]: "product_attributes" /* PRODUCT_ATTRIBUTES */,
|
|
125
|
+
["product.template.attribute.line" /* PRODUCT_TEMPLATE_ATTRIBUTE_LINE */]: "product_template_attribute_lines" /* PRODUCT_TEMPLATE_ATTRIBUTE_LINES */,
|
|
126
|
+
["product.template.attribute.value" /* PRODUCT_TEMPLATE_ATTRIBUTE_VALUE */]: "product_template_attribute_values" /* PRODUCT_TEMPLATE_ATTRIBUTE_VALUES */,
|
|
123
127
|
["product.product" /* PRODUCT_PRODUCT */]: "products" /* PRODUCTS */,
|
|
124
128
|
["restaurant.floor" /* RESTAURANT_FLOOR */]: "restaurant_floors" /* RESTAURANT_FLOORS */,
|
|
125
|
-
["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables" /* RESTAURANT_TABLES
|
|
129
|
+
["restaurant.table" /* RESTAURANT_TABLE */]: "restaurant_tables" /* RESTAURANT_TABLES */,
|
|
130
|
+
["res.country.state" /* RES_COUNTRY_STATE */]: "states" /* STATES */,
|
|
131
|
+
["res.country.ward" /* COUNTRY_WARD */]: "wards" /* WARDS */,
|
|
132
|
+
["res.partner.title" /* RES_PARTNER_TITLE */]: "partner_titles" /* PARTNER_TITLES */
|
|
126
133
|
};
|
|
127
134
|
|
|
128
135
|
// src/utils/domain/py_tokenizer.ts
|
|
@@ -5129,6 +5136,7 @@ var uploadImageSupabaseService = () => {
|
|
|
5129
5136
|
return { url: null, error: uploadError };
|
|
5130
5137
|
}
|
|
5131
5138
|
const { data: urlData } = supabase.storage.from(bucketName).getPublicUrl(fileName);
|
|
5139
|
+
console.log("urlData", urlData);
|
|
5132
5140
|
return { url: urlData.publicUrl, error: null };
|
|
5133
5141
|
} catch (error) {
|
|
5134
5142
|
console.error("Error uploading image:", error);
|
|
@@ -5142,6 +5150,83 @@ var uploadImageSupabaseService = () => {
|
|
|
5142
5150
|
};
|
|
5143
5151
|
};
|
|
5144
5152
|
|
|
5153
|
+
// src/services/pos-service/supabase/get-list-users.ts
|
|
5154
|
+
import { useCallback as useCallback56 } from "react";
|
|
5155
|
+
var getListUsersService = (env) => {
|
|
5156
|
+
const getListUsers = useCallback56(
|
|
5157
|
+
({ tenantId }) => {
|
|
5158
|
+
const jsonData = {
|
|
5159
|
+
model: "tenant.users",
|
|
5160
|
+
method: "search_read"
|
|
5161
|
+
};
|
|
5162
|
+
return env?.requests.post("/api/v2/call" /* SUPABASE_CALL_PATH */, jsonData, {
|
|
5163
|
+
headers: {
|
|
5164
|
+
"Content-Type": "application/json",
|
|
5165
|
+
"x-tenant-id": tenantId
|
|
5166
|
+
}
|
|
5167
|
+
});
|
|
5168
|
+
},
|
|
5169
|
+
[env]
|
|
5170
|
+
);
|
|
5171
|
+
return {
|
|
5172
|
+
getListUsers
|
|
5173
|
+
};
|
|
5174
|
+
};
|
|
5175
|
+
|
|
5176
|
+
// src/services/pos-service/supabase/get-list-roles.ts
|
|
5177
|
+
import { useCallback as useCallback57 } from "react";
|
|
5178
|
+
var getListRolesService = (env) => {
|
|
5179
|
+
const getListRoles = useCallback57(
|
|
5180
|
+
({ tenantId }) => {
|
|
5181
|
+
const jsonData = {
|
|
5182
|
+
model: "tenant.roles",
|
|
5183
|
+
method: "search_read"
|
|
5184
|
+
};
|
|
5185
|
+
return env?.requests.post("/api/v2/call" /* SUPABASE_CALL_PATH */, jsonData, {
|
|
5186
|
+
headers: {
|
|
5187
|
+
"Content-Type": "application/json",
|
|
5188
|
+
"x-tenant-id": tenantId
|
|
5189
|
+
}
|
|
5190
|
+
});
|
|
5191
|
+
},
|
|
5192
|
+
[env]
|
|
5193
|
+
);
|
|
5194
|
+
return {
|
|
5195
|
+
getListRoles
|
|
5196
|
+
};
|
|
5197
|
+
};
|
|
5198
|
+
|
|
5199
|
+
// src/services/pos-service/supabase/assign-role.ts
|
|
5200
|
+
import { useCallback as useCallback58 } from "react";
|
|
5201
|
+
var assignRoleService = (env) => {
|
|
5202
|
+
const assignRole = useCallback58(
|
|
5203
|
+
({
|
|
5204
|
+
tenantId,
|
|
5205
|
+
userId,
|
|
5206
|
+
roleId
|
|
5207
|
+
}) => {
|
|
5208
|
+
const jsonData = {
|
|
5209
|
+
model: "tenant.user_roles",
|
|
5210
|
+
method: "assign",
|
|
5211
|
+
kwargs: {
|
|
5212
|
+
user_id: userId,
|
|
5213
|
+
role_id: roleId
|
|
5214
|
+
}
|
|
5215
|
+
};
|
|
5216
|
+
return env?.requests.post("/api/v2/call" /* SUPABASE_CALL_PATH */, jsonData, {
|
|
5217
|
+
headers: {
|
|
5218
|
+
"Content-Type": "application/json",
|
|
5219
|
+
"x-tenant-id": tenantId
|
|
5220
|
+
}
|
|
5221
|
+
});
|
|
5222
|
+
},
|
|
5223
|
+
[env]
|
|
5224
|
+
);
|
|
5225
|
+
return {
|
|
5226
|
+
assignRole
|
|
5227
|
+
};
|
|
5228
|
+
};
|
|
5229
|
+
|
|
5145
5230
|
// src/services/pos-service/index.ts
|
|
5146
5231
|
var serviceFactories = [
|
|
5147
5232
|
addEntityService,
|
|
@@ -5196,7 +5281,10 @@ var serviceFactories = [
|
|
|
5196
5281
|
createCustomerSupabaseService,
|
|
5197
5282
|
updateCustomerSupabaseService,
|
|
5198
5283
|
deleteCustomerSupabaseService,
|
|
5199
|
-
uploadImageSupabaseService
|
|
5284
|
+
uploadImageSupabaseService,
|
|
5285
|
+
getListUsersService,
|
|
5286
|
+
getListRolesService,
|
|
5287
|
+
assignRoleService
|
|
5200
5288
|
];
|
|
5201
5289
|
var usePosService = () => {
|
|
5202
5290
|
const { env } = useEnv();
|
|
@@ -5364,6 +5452,15 @@ import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
|
5364
5452
|
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
5365
5453
|
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
5366
5454
|
|
|
5455
|
+
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
5456
|
+
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
5457
|
+
|
|
5458
|
+
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
5459
|
+
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
5460
|
+
|
|
5461
|
+
// src/hooks/pos/supabase/use-assign-role.ts
|
|
5462
|
+
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
5463
|
+
|
|
5367
5464
|
// src/provider/service-provider.tsx
|
|
5368
5465
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5369
5466
|
var ServiceContext = createContext3(null);
|
|
@@ -5375,7 +5472,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5375
5472
|
// src/services/action-service/index.ts
|
|
5376
5473
|
function useActionService() {
|
|
5377
5474
|
const { env } = useEnv();
|
|
5378
|
-
const loadAction =
|
|
5475
|
+
const loadAction = useCallback59(
|
|
5379
5476
|
async ({
|
|
5380
5477
|
idAction,
|
|
5381
5478
|
context,
|
|
@@ -5399,7 +5496,7 @@ function useActionService() {
|
|
|
5399
5496
|
},
|
|
5400
5497
|
[env]
|
|
5401
5498
|
);
|
|
5402
|
-
const callButton =
|
|
5499
|
+
const callButton = useCallback59(
|
|
5403
5500
|
async ({
|
|
5404
5501
|
model,
|
|
5405
5502
|
ids = [],
|
|
@@ -5433,7 +5530,7 @@ function useActionService() {
|
|
|
5433
5530
|
},
|
|
5434
5531
|
[env]
|
|
5435
5532
|
);
|
|
5436
|
-
const removeRows =
|
|
5533
|
+
const removeRows = useCallback59(
|
|
5437
5534
|
async ({
|
|
5438
5535
|
model,
|
|
5439
5536
|
ids,
|
|
@@ -5459,7 +5556,7 @@ function useActionService() {
|
|
|
5459
5556
|
},
|
|
5460
5557
|
[env]
|
|
5461
5558
|
);
|
|
5462
|
-
const duplicateRecord =
|
|
5559
|
+
const duplicateRecord = useCallback59(
|
|
5463
5560
|
async ({
|
|
5464
5561
|
model,
|
|
5465
5562
|
id,
|
|
@@ -5485,7 +5582,7 @@ function useActionService() {
|
|
|
5485
5582
|
},
|
|
5486
5583
|
[env]
|
|
5487
5584
|
);
|
|
5488
|
-
const getPrintReportName =
|
|
5585
|
+
const getPrintReportName = useCallback59(
|
|
5489
5586
|
async ({ id }) => {
|
|
5490
5587
|
const jsonData = {
|
|
5491
5588
|
model: "ir.actions.report",
|
|
@@ -5503,7 +5600,7 @@ function useActionService() {
|
|
|
5503
5600
|
},
|
|
5504
5601
|
[env]
|
|
5505
5602
|
);
|
|
5506
|
-
const print =
|
|
5603
|
+
const print = useCallback59(
|
|
5507
5604
|
async ({ id, report, db }) => {
|
|
5508
5605
|
const jsonData = {
|
|
5509
5606
|
report,
|
|
@@ -5521,7 +5618,7 @@ function useActionService() {
|
|
|
5521
5618
|
},
|
|
5522
5619
|
[env]
|
|
5523
5620
|
);
|
|
5524
|
-
const runAction =
|
|
5621
|
+
const runAction = useCallback59(
|
|
5525
5622
|
async ({
|
|
5526
5623
|
idAction,
|
|
5527
5624
|
context,
|
|
@@ -5548,7 +5645,7 @@ function useActionService() {
|
|
|
5548
5645
|
},
|
|
5549
5646
|
[env]
|
|
5550
5647
|
);
|
|
5551
|
-
const generateSerialNumber =
|
|
5648
|
+
const generateSerialNumber = useCallback59(
|
|
5552
5649
|
async ({
|
|
5553
5650
|
kwargs,
|
|
5554
5651
|
context,
|
|
@@ -5573,7 +5670,7 @@ function useActionService() {
|
|
|
5573
5670
|
},
|
|
5574
5671
|
[env]
|
|
5575
5672
|
);
|
|
5576
|
-
const actionServerHome =
|
|
5673
|
+
const actionServerHome = useCallback59(async () => {
|
|
5577
5674
|
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5578
5675
|
}, [env]);
|
|
5579
5676
|
return {
|
|
@@ -5590,11 +5687,11 @@ function useActionService() {
|
|
|
5590
5687
|
}
|
|
5591
5688
|
|
|
5592
5689
|
// src/services/auth-service/index.ts
|
|
5593
|
-
import { useCallback as
|
|
5690
|
+
import { useCallback as useCallback60 } from "react";
|
|
5594
5691
|
function useAuthService() {
|
|
5595
5692
|
const { env } = useEnv();
|
|
5596
5693
|
const supabase = useSupabaseOptional();
|
|
5597
|
-
const login =
|
|
5694
|
+
const login = useCallback60(
|
|
5598
5695
|
async (body) => {
|
|
5599
5696
|
const payload = Object.fromEntries(
|
|
5600
5697
|
Object.entries({
|
|
@@ -5619,7 +5716,7 @@ function useAuthService() {
|
|
|
5619
5716
|
},
|
|
5620
5717
|
[env]
|
|
5621
5718
|
);
|
|
5622
|
-
const loginTenantUser =
|
|
5719
|
+
const loginTenantUser = useCallback60(
|
|
5623
5720
|
async (body) => {
|
|
5624
5721
|
const payload = {
|
|
5625
5722
|
email: body.email,
|
|
@@ -5634,7 +5731,7 @@ function useAuthService() {
|
|
|
5634
5731
|
},
|
|
5635
5732
|
[env]
|
|
5636
5733
|
);
|
|
5637
|
-
const forgotPassword =
|
|
5734
|
+
const forgotPassword = useCallback60(
|
|
5638
5735
|
async (email) => {
|
|
5639
5736
|
const bodyData = {
|
|
5640
5737
|
login: email,
|
|
@@ -5648,7 +5745,7 @@ function useAuthService() {
|
|
|
5648
5745
|
},
|
|
5649
5746
|
[env]
|
|
5650
5747
|
);
|
|
5651
|
-
const forgotPasswordSSO =
|
|
5748
|
+
const forgotPasswordSSO = useCallback60(
|
|
5652
5749
|
async ({
|
|
5653
5750
|
email,
|
|
5654
5751
|
with_context,
|
|
@@ -5671,7 +5768,7 @@ function useAuthService() {
|
|
|
5671
5768
|
},
|
|
5672
5769
|
[env]
|
|
5673
5770
|
);
|
|
5674
|
-
const resetPassword =
|
|
5771
|
+
const resetPassword = useCallback60(
|
|
5675
5772
|
async (data, token) => {
|
|
5676
5773
|
const bodyData = {
|
|
5677
5774
|
token,
|
|
@@ -5686,7 +5783,7 @@ function useAuthService() {
|
|
|
5686
5783
|
},
|
|
5687
5784
|
[env]
|
|
5688
5785
|
);
|
|
5689
|
-
const resetPasswordSSO =
|
|
5786
|
+
const resetPasswordSSO = useCallback60(
|
|
5690
5787
|
async ({
|
|
5691
5788
|
method,
|
|
5692
5789
|
password,
|
|
@@ -5709,7 +5806,7 @@ function useAuthService() {
|
|
|
5709
5806
|
},
|
|
5710
5807
|
[env]
|
|
5711
5808
|
);
|
|
5712
|
-
const updatePassword =
|
|
5809
|
+
const updatePassword = useCallback60(
|
|
5713
5810
|
async (data, token) => {
|
|
5714
5811
|
const bodyData = {
|
|
5715
5812
|
token,
|
|
@@ -5724,7 +5821,7 @@ function useAuthService() {
|
|
|
5724
5821
|
},
|
|
5725
5822
|
[env]
|
|
5726
5823
|
);
|
|
5727
|
-
const isValidToken =
|
|
5824
|
+
const isValidToken = useCallback60(
|
|
5728
5825
|
async (token) => {
|
|
5729
5826
|
const bodyData = {
|
|
5730
5827
|
token
|
|
@@ -5737,7 +5834,7 @@ function useAuthService() {
|
|
|
5737
5834
|
},
|
|
5738
5835
|
[env]
|
|
5739
5836
|
);
|
|
5740
|
-
const isValidActionToken =
|
|
5837
|
+
const isValidActionToken = useCallback60(
|
|
5741
5838
|
async (actionToken) => {
|
|
5742
5839
|
const bodyData = {};
|
|
5743
5840
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5750,7 +5847,7 @@ function useAuthService() {
|
|
|
5750
5847
|
},
|
|
5751
5848
|
[env]
|
|
5752
5849
|
);
|
|
5753
|
-
const loginSocial =
|
|
5850
|
+
const loginSocial = useCallback60(
|
|
5754
5851
|
async ({
|
|
5755
5852
|
db,
|
|
5756
5853
|
state,
|
|
@@ -5768,13 +5865,13 @@ function useAuthService() {
|
|
|
5768
5865
|
},
|
|
5769
5866
|
[env]
|
|
5770
5867
|
);
|
|
5771
|
-
const getProviders =
|
|
5868
|
+
const getProviders = useCallback60(
|
|
5772
5869
|
async (db) => {
|
|
5773
5870
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5774
5871
|
},
|
|
5775
5872
|
[env]
|
|
5776
5873
|
);
|
|
5777
|
-
const getAccessByCode =
|
|
5874
|
+
const getAccessByCode = useCallback60(
|
|
5778
5875
|
async (code) => {
|
|
5779
5876
|
const data = new URLSearchParams();
|
|
5780
5877
|
data.append("code", code);
|
|
@@ -5794,7 +5891,7 @@ function useAuthService() {
|
|
|
5794
5891
|
},
|
|
5795
5892
|
[env]
|
|
5796
5893
|
);
|
|
5797
|
-
const logout =
|
|
5894
|
+
const logout = useCallback60(
|
|
5798
5895
|
async (service) => {
|
|
5799
5896
|
return env?.requests?.post(
|
|
5800
5897
|
"/logout" /* LOGOUT */,
|
|
@@ -5811,7 +5908,7 @@ function useAuthService() {
|
|
|
5811
5908
|
},
|
|
5812
5909
|
[env]
|
|
5813
5910
|
);
|
|
5814
|
-
const getTenantMapping =
|
|
5911
|
+
const getTenantMapping = useCallback60(
|
|
5815
5912
|
async ({ shortName, service }) => {
|
|
5816
5913
|
const bodyData = {
|
|
5817
5914
|
short_name: shortName
|
|
@@ -5829,7 +5926,7 @@ function useAuthService() {
|
|
|
5829
5926
|
},
|
|
5830
5927
|
[env]
|
|
5831
5928
|
);
|
|
5832
|
-
const getToken =
|
|
5929
|
+
const getToken = useCallback60(
|
|
5833
5930
|
async ({
|
|
5834
5931
|
phone,
|
|
5835
5932
|
name,
|
|
@@ -5874,10 +5971,10 @@ function useAuthService() {
|
|
|
5874
5971
|
}
|
|
5875
5972
|
|
|
5876
5973
|
// src/services/company-service/index.ts
|
|
5877
|
-
import { useCallback as
|
|
5974
|
+
import { useCallback as useCallback61 } from "react";
|
|
5878
5975
|
function useCompanyService() {
|
|
5879
5976
|
const { env } = useEnv();
|
|
5880
|
-
const getCurrentCompany =
|
|
5977
|
+
const getCurrentCompany = useCallback61(
|
|
5881
5978
|
async (service, extraHeaders) => {
|
|
5882
5979
|
return await env.requests.get(
|
|
5883
5980
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5894,7 +5991,7 @@ function useCompanyService() {
|
|
|
5894
5991
|
},
|
|
5895
5992
|
[env]
|
|
5896
5993
|
);
|
|
5897
|
-
const getInfoCompany =
|
|
5994
|
+
const getInfoCompany = useCallback61(
|
|
5898
5995
|
async (id, service) => {
|
|
5899
5996
|
const jsonData = {
|
|
5900
5997
|
ids: [id],
|
|
@@ -5930,10 +6027,10 @@ function useCompanyService() {
|
|
|
5930
6027
|
}
|
|
5931
6028
|
|
|
5932
6029
|
// src/services/excel-service/index.ts
|
|
5933
|
-
import { useCallback as
|
|
6030
|
+
import { useCallback as useCallback62 } from "react";
|
|
5934
6031
|
function useExcelService() {
|
|
5935
6032
|
const { env } = useEnv();
|
|
5936
|
-
const uploadFileExcel =
|
|
6033
|
+
const uploadFileExcel = useCallback62(
|
|
5937
6034
|
async ({
|
|
5938
6035
|
formData,
|
|
5939
6036
|
service,
|
|
@@ -5950,7 +6047,7 @@ function useExcelService() {
|
|
|
5950
6047
|
},
|
|
5951
6048
|
[env]
|
|
5952
6049
|
);
|
|
5953
|
-
const uploadIdFile =
|
|
6050
|
+
const uploadIdFile = useCallback62(
|
|
5954
6051
|
async ({
|
|
5955
6052
|
formData,
|
|
5956
6053
|
service,
|
|
@@ -5967,7 +6064,7 @@ function useExcelService() {
|
|
|
5967
6064
|
},
|
|
5968
6065
|
[env]
|
|
5969
6066
|
);
|
|
5970
|
-
const parsePreview =
|
|
6067
|
+
const parsePreview = useCallback62(
|
|
5971
6068
|
async ({
|
|
5972
6069
|
id,
|
|
5973
6070
|
selectedSheet,
|
|
@@ -6016,7 +6113,7 @@ function useExcelService() {
|
|
|
6016
6113
|
},
|
|
6017
6114
|
[env]
|
|
6018
6115
|
);
|
|
6019
|
-
const executeImport =
|
|
6116
|
+
const executeImport = useCallback62(
|
|
6020
6117
|
async ({
|
|
6021
6118
|
columns,
|
|
6022
6119
|
fields,
|
|
@@ -6050,7 +6147,7 @@ function useExcelService() {
|
|
|
6050
6147
|
},
|
|
6051
6148
|
[env]
|
|
6052
6149
|
);
|
|
6053
|
-
const getFileExcel =
|
|
6150
|
+
const getFileExcel = useCallback62(
|
|
6054
6151
|
async ({
|
|
6055
6152
|
model,
|
|
6056
6153
|
service,
|
|
@@ -6074,7 +6171,7 @@ function useExcelService() {
|
|
|
6074
6171
|
},
|
|
6075
6172
|
[env]
|
|
6076
6173
|
);
|
|
6077
|
-
const getFieldExport =
|
|
6174
|
+
const getFieldExport = useCallback62(
|
|
6078
6175
|
async ({
|
|
6079
6176
|
ids,
|
|
6080
6177
|
model,
|
|
@@ -6114,7 +6211,7 @@ function useExcelService() {
|
|
|
6114
6211
|
},
|
|
6115
6212
|
[env]
|
|
6116
6213
|
);
|
|
6117
|
-
const exportExcel =
|
|
6214
|
+
const exportExcel = useCallback62(
|
|
6118
6215
|
async ({
|
|
6119
6216
|
model,
|
|
6120
6217
|
domain,
|
|
@@ -6162,10 +6259,10 @@ function useExcelService() {
|
|
|
6162
6259
|
}
|
|
6163
6260
|
|
|
6164
6261
|
// src/services/form-service/index.ts
|
|
6165
|
-
import { useCallback as
|
|
6262
|
+
import { useCallback as useCallback63 } from "react";
|
|
6166
6263
|
function useFormService() {
|
|
6167
6264
|
const { env } = useEnv();
|
|
6168
|
-
const getComment =
|
|
6265
|
+
const getComment = useCallback63(
|
|
6169
6266
|
async ({ data }) => {
|
|
6170
6267
|
const jsonData = {
|
|
6171
6268
|
thread_id: data.thread_id,
|
|
@@ -6183,7 +6280,7 @@ function useFormService() {
|
|
|
6183
6280
|
},
|
|
6184
6281
|
[env]
|
|
6185
6282
|
);
|
|
6186
|
-
const getThreadData =
|
|
6283
|
+
const getThreadData = useCallback63(
|
|
6187
6284
|
async ({
|
|
6188
6285
|
data,
|
|
6189
6286
|
xNode,
|
|
@@ -6210,7 +6307,7 @@ function useFormService() {
|
|
|
6210
6307
|
},
|
|
6211
6308
|
[env]
|
|
6212
6309
|
);
|
|
6213
|
-
const getThreadMessages =
|
|
6310
|
+
const getThreadMessages = useCallback63(
|
|
6214
6311
|
async ({
|
|
6215
6312
|
data,
|
|
6216
6313
|
xNode,
|
|
@@ -6236,7 +6333,7 @@ function useFormService() {
|
|
|
6236
6333
|
},
|
|
6237
6334
|
[env]
|
|
6238
6335
|
);
|
|
6239
|
-
const sentComment =
|
|
6336
|
+
const sentComment = useCallback63(
|
|
6240
6337
|
async ({ data }) => {
|
|
6241
6338
|
const jsonData = {
|
|
6242
6339
|
context: {
|
|
@@ -6264,7 +6361,7 @@ function useFormService() {
|
|
|
6264
6361
|
},
|
|
6265
6362
|
[env]
|
|
6266
6363
|
);
|
|
6267
|
-
const deleteComment =
|
|
6364
|
+
const deleteComment = useCallback63(
|
|
6268
6365
|
async ({ data }) => {
|
|
6269
6366
|
const jsonData = {
|
|
6270
6367
|
attachment_ids: [],
|
|
@@ -6280,7 +6377,7 @@ function useFormService() {
|
|
|
6280
6377
|
},
|
|
6281
6378
|
[env]
|
|
6282
6379
|
);
|
|
6283
|
-
const getImage =
|
|
6380
|
+
const getImage = useCallback63(
|
|
6284
6381
|
async ({ data }) => {
|
|
6285
6382
|
return env.requests.get(
|
|
6286
6383
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6293,7 +6390,7 @@ function useFormService() {
|
|
|
6293
6390
|
},
|
|
6294
6391
|
[env]
|
|
6295
6392
|
);
|
|
6296
|
-
const uploadImage =
|
|
6393
|
+
const uploadImage = useCallback63(
|
|
6297
6394
|
async ({
|
|
6298
6395
|
formData,
|
|
6299
6396
|
service,
|
|
@@ -6312,7 +6409,7 @@ function useFormService() {
|
|
|
6312
6409
|
},
|
|
6313
6410
|
[env]
|
|
6314
6411
|
);
|
|
6315
|
-
const uploadFile =
|
|
6412
|
+
const uploadFile = useCallback63(
|
|
6316
6413
|
async ({
|
|
6317
6414
|
formData,
|
|
6318
6415
|
service,
|
|
@@ -6332,7 +6429,7 @@ function useFormService() {
|
|
|
6332
6429
|
},
|
|
6333
6430
|
[env]
|
|
6334
6431
|
);
|
|
6335
|
-
const getFormView =
|
|
6432
|
+
const getFormView = useCallback63(
|
|
6336
6433
|
async ({ data }) => {
|
|
6337
6434
|
const jsonData = {
|
|
6338
6435
|
model: data.model,
|
|
@@ -6348,7 +6445,7 @@ function useFormService() {
|
|
|
6348
6445
|
},
|
|
6349
6446
|
[env]
|
|
6350
6447
|
);
|
|
6351
|
-
const changeStatus =
|
|
6448
|
+
const changeStatus = useCallback63(
|
|
6352
6449
|
async ({ data }) => {
|
|
6353
6450
|
const vals = {
|
|
6354
6451
|
[data.name]: data.stage_id
|
|
@@ -6377,7 +6474,7 @@ function useFormService() {
|
|
|
6377
6474
|
},
|
|
6378
6475
|
[env]
|
|
6379
6476
|
);
|
|
6380
|
-
const getExternalTab =
|
|
6477
|
+
const getExternalTab = useCallback63(
|
|
6381
6478
|
async ({ method, context, service, xNode }) => {
|
|
6382
6479
|
return env?.requests?.post(
|
|
6383
6480
|
"/call" /* CALL_PATH */,
|
|
@@ -6412,10 +6509,10 @@ function useFormService() {
|
|
|
6412
6509
|
}
|
|
6413
6510
|
|
|
6414
6511
|
// src/services/kanban-service/index.ts
|
|
6415
|
-
import { useCallback as
|
|
6512
|
+
import { useCallback as useCallback64 } from "react";
|
|
6416
6513
|
function useKanbanService() {
|
|
6417
6514
|
const { env } = useEnv();
|
|
6418
|
-
const getGroups =
|
|
6515
|
+
const getGroups = useCallback64(
|
|
6419
6516
|
async ({ model, width_context }) => {
|
|
6420
6517
|
const jsonData = {
|
|
6421
6518
|
model,
|
|
@@ -6435,7 +6532,7 @@ function useKanbanService() {
|
|
|
6435
6532
|
},
|
|
6436
6533
|
[env]
|
|
6437
6534
|
);
|
|
6438
|
-
const getProgressBar =
|
|
6535
|
+
const getProgressBar = useCallback64(
|
|
6439
6536
|
async ({ field, color, model, width_context }) => {
|
|
6440
6537
|
const jsonData = {
|
|
6441
6538
|
model,
|
|
@@ -6465,10 +6562,10 @@ function useKanbanService() {
|
|
|
6465
6562
|
}
|
|
6466
6563
|
|
|
6467
6564
|
// src/services/model-service/index.ts
|
|
6468
|
-
import { useCallback as
|
|
6565
|
+
import { useCallback as useCallback65 } from "react";
|
|
6469
6566
|
function useModelService() {
|
|
6470
6567
|
const { env } = useEnv();
|
|
6471
|
-
const getListMyBankAccount =
|
|
6568
|
+
const getListMyBankAccount = useCallback65(
|
|
6472
6569
|
async ({
|
|
6473
6570
|
domain,
|
|
6474
6571
|
spectification,
|
|
@@ -6492,7 +6589,7 @@ function useModelService() {
|
|
|
6492
6589
|
},
|
|
6493
6590
|
[env]
|
|
6494
6591
|
);
|
|
6495
|
-
const getCurrency =
|
|
6592
|
+
const getCurrency = useCallback65(async () => {
|
|
6496
6593
|
const jsonData = {
|
|
6497
6594
|
model: "res.currency",
|
|
6498
6595
|
method: "web_search_read",
|
|
@@ -6512,7 +6609,7 @@ function useModelService() {
|
|
|
6512
6609
|
}
|
|
6513
6610
|
});
|
|
6514
6611
|
}, [env]);
|
|
6515
|
-
const getConversionRate =
|
|
6612
|
+
const getConversionRate = useCallback65(async () => {
|
|
6516
6613
|
const jsonData = {
|
|
6517
6614
|
model: "res.currency",
|
|
6518
6615
|
method: "web_search_read",
|
|
@@ -6538,7 +6635,7 @@ function useModelService() {
|
|
|
6538
6635
|
}
|
|
6539
6636
|
});
|
|
6540
6637
|
}, [env]);
|
|
6541
|
-
const getAll =
|
|
6638
|
+
const getAll = useCallback65(
|
|
6542
6639
|
async ({
|
|
6543
6640
|
data,
|
|
6544
6641
|
service,
|
|
@@ -6580,7 +6677,7 @@ function useModelService() {
|
|
|
6580
6677
|
},
|
|
6581
6678
|
[env]
|
|
6582
6679
|
);
|
|
6583
|
-
const getListCalendar =
|
|
6680
|
+
const getListCalendar = useCallback65(
|
|
6584
6681
|
async ({ data }) => {
|
|
6585
6682
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6586
6683
|
fields: data.fields,
|
|
@@ -6611,7 +6708,7 @@ function useModelService() {
|
|
|
6611
6708
|
},
|
|
6612
6709
|
[env]
|
|
6613
6710
|
);
|
|
6614
|
-
const getList =
|
|
6711
|
+
const getList = useCallback65(
|
|
6615
6712
|
async ({
|
|
6616
6713
|
model,
|
|
6617
6714
|
ids = [],
|
|
@@ -6643,7 +6740,7 @@ function useModelService() {
|
|
|
6643
6740
|
},
|
|
6644
6741
|
[env]
|
|
6645
6742
|
);
|
|
6646
|
-
const getDetail =
|
|
6743
|
+
const getDetail = useCallback65(
|
|
6647
6744
|
async ({
|
|
6648
6745
|
ids = [],
|
|
6649
6746
|
model,
|
|
@@ -6675,7 +6772,7 @@ function useModelService() {
|
|
|
6675
6772
|
},
|
|
6676
6773
|
[env]
|
|
6677
6774
|
);
|
|
6678
|
-
const save =
|
|
6775
|
+
const save = useCallback65(
|
|
6679
6776
|
async ({
|
|
6680
6777
|
model,
|
|
6681
6778
|
ids = [],
|
|
@@ -6710,7 +6807,7 @@ function useModelService() {
|
|
|
6710
6807
|
},
|
|
6711
6808
|
[env]
|
|
6712
6809
|
);
|
|
6713
|
-
const deleteApi =
|
|
6810
|
+
const deleteApi = useCallback65(
|
|
6714
6811
|
async ({ ids = [], model, service }) => {
|
|
6715
6812
|
const jsonData = {
|
|
6716
6813
|
model,
|
|
@@ -6730,7 +6827,7 @@ function useModelService() {
|
|
|
6730
6827
|
},
|
|
6731
6828
|
[env]
|
|
6732
6829
|
);
|
|
6733
|
-
const onChange =
|
|
6830
|
+
const onChange = useCallback65(
|
|
6734
6831
|
async ({
|
|
6735
6832
|
ids = [],
|
|
6736
6833
|
model,
|
|
@@ -6766,7 +6863,7 @@ function useModelService() {
|
|
|
6766
6863
|
},
|
|
6767
6864
|
[env]
|
|
6768
6865
|
);
|
|
6769
|
-
const getListFieldsOnchange =
|
|
6866
|
+
const getListFieldsOnchange = useCallback65(
|
|
6770
6867
|
async ({
|
|
6771
6868
|
model,
|
|
6772
6869
|
service,
|
|
@@ -6790,7 +6887,7 @@ function useModelService() {
|
|
|
6790
6887
|
},
|
|
6791
6888
|
[env]
|
|
6792
6889
|
);
|
|
6793
|
-
const parseORMOdoo =
|
|
6890
|
+
const parseORMOdoo = useCallback65((data) => {
|
|
6794
6891
|
for (const key in data) {
|
|
6795
6892
|
if (key === "display_name") {
|
|
6796
6893
|
delete data[key];
|
|
@@ -6801,7 +6898,7 @@ function useModelService() {
|
|
|
6801
6898
|
}
|
|
6802
6899
|
return { ...data };
|
|
6803
6900
|
}, []);
|
|
6804
|
-
const toDataJS =
|
|
6901
|
+
const toDataJS = useCallback65(
|
|
6805
6902
|
(data, viewData, model) => {
|
|
6806
6903
|
for (const key in data) {
|
|
6807
6904
|
if (data[key] === false) {
|
|
@@ -6859,10 +6956,10 @@ function useModelService() {
|
|
|
6859
6956
|
}
|
|
6860
6957
|
|
|
6861
6958
|
// src/services/user-service/index.ts
|
|
6862
|
-
import { useCallback as
|
|
6959
|
+
import { useCallback as useCallback66 } from "react";
|
|
6863
6960
|
function useUserService() {
|
|
6864
6961
|
const { env } = useEnv();
|
|
6865
|
-
const getProfile =
|
|
6962
|
+
const getProfile = useCallback66(
|
|
6866
6963
|
async (service, path, extraHeaders) => {
|
|
6867
6964
|
return env?.requests?.get(
|
|
6868
6965
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6879,7 +6976,7 @@ function useUserService() {
|
|
|
6879
6976
|
},
|
|
6880
6977
|
[env]
|
|
6881
6978
|
);
|
|
6882
|
-
const getUser =
|
|
6979
|
+
const getUser = useCallback66(
|
|
6883
6980
|
async ({ context, id }) => {
|
|
6884
6981
|
const jsonData = {
|
|
6885
6982
|
model: "res.users",
|
|
@@ -6917,7 +7014,7 @@ function useUserService() {
|
|
|
6917
7014
|
},
|
|
6918
7015
|
[env]
|
|
6919
7016
|
);
|
|
6920
|
-
const switchUserLocale =
|
|
7017
|
+
const switchUserLocale = useCallback66(
|
|
6921
7018
|
async ({ id, values, service }) => {
|
|
6922
7019
|
const jsonData = {
|
|
6923
7020
|
model: "res.users",
|
|
@@ -6945,10 +7042,10 @@ function useUserService() {
|
|
|
6945
7042
|
}
|
|
6946
7043
|
|
|
6947
7044
|
// src/services/view-service/index.ts
|
|
6948
|
-
import { useCallback as
|
|
7045
|
+
import { useCallback as useCallback67 } from "react";
|
|
6949
7046
|
function useViewService() {
|
|
6950
7047
|
const { env } = useEnv();
|
|
6951
|
-
const getView =
|
|
7048
|
+
const getView = useCallback67(
|
|
6952
7049
|
async ({
|
|
6953
7050
|
model,
|
|
6954
7051
|
views,
|
|
@@ -6988,7 +7085,7 @@ function useViewService() {
|
|
|
6988
7085
|
},
|
|
6989
7086
|
[env]
|
|
6990
7087
|
);
|
|
6991
|
-
const getMenu =
|
|
7088
|
+
const getMenu = useCallback67(
|
|
6992
7089
|
async (context, specification, domain, service) => {
|
|
6993
7090
|
const jsonData = {
|
|
6994
7091
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -7019,7 +7116,7 @@ function useViewService() {
|
|
|
7019
7116
|
},
|
|
7020
7117
|
[env]
|
|
7021
7118
|
);
|
|
7022
|
-
const getActionDetail =
|
|
7119
|
+
const getActionDetail = useCallback67(
|
|
7023
7120
|
async (aid, context) => {
|
|
7024
7121
|
const jsonData = {
|
|
7025
7122
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7049,7 +7146,7 @@ function useViewService() {
|
|
|
7049
7146
|
},
|
|
7050
7147
|
[env]
|
|
7051
7148
|
);
|
|
7052
|
-
const getResequence =
|
|
7149
|
+
const getResequence = useCallback67(
|
|
7053
7150
|
async ({
|
|
7054
7151
|
model,
|
|
7055
7152
|
ids,
|
|
@@ -7079,7 +7176,7 @@ function useViewService() {
|
|
|
7079
7176
|
},
|
|
7080
7177
|
[env]
|
|
7081
7178
|
);
|
|
7082
|
-
const getSelectionItem =
|
|
7179
|
+
const getSelectionItem = useCallback67(
|
|
7083
7180
|
async ({
|
|
7084
7181
|
data,
|
|
7085
7182
|
service,
|
|
@@ -7116,7 +7213,7 @@ function useViewService() {
|
|
|
7116
7213
|
},
|
|
7117
7214
|
[env]
|
|
7118
7215
|
);
|
|
7119
|
-
const loadMessages =
|
|
7216
|
+
const loadMessages = useCallback67(async () => {
|
|
7120
7217
|
return env.requests.post(
|
|
7121
7218
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7122
7219
|
{},
|
|
@@ -7127,14 +7224,14 @@ function useViewService() {
|
|
|
7127
7224
|
}
|
|
7128
7225
|
);
|
|
7129
7226
|
}, [env]);
|
|
7130
|
-
const getVersion =
|
|
7227
|
+
const getVersion = useCallback67(async () => {
|
|
7131
7228
|
return env?.requests?.get("", {
|
|
7132
7229
|
headers: {
|
|
7133
7230
|
"Content-Type": "application/json"
|
|
7134
7231
|
}
|
|
7135
7232
|
});
|
|
7136
7233
|
}, [env]);
|
|
7137
|
-
const grantAccess =
|
|
7234
|
+
const grantAccess = useCallback67(
|
|
7138
7235
|
async ({
|
|
7139
7236
|
redirect_uri,
|
|
7140
7237
|
state,
|
|
@@ -7161,7 +7258,7 @@ function useViewService() {
|
|
|
7161
7258
|
},
|
|
7162
7259
|
[env]
|
|
7163
7260
|
);
|
|
7164
|
-
const removeTotpSetUp =
|
|
7261
|
+
const removeTotpSetUp = useCallback67(
|
|
7165
7262
|
async ({ method, token }) => {
|
|
7166
7263
|
const jsonData = {
|
|
7167
7264
|
method,
|
|
@@ -7182,7 +7279,7 @@ function useViewService() {
|
|
|
7182
7279
|
},
|
|
7183
7280
|
[env]
|
|
7184
7281
|
);
|
|
7185
|
-
const requestSetupTotp =
|
|
7282
|
+
const requestSetupTotp = useCallback67(
|
|
7186
7283
|
async ({ method, token }) => {
|
|
7187
7284
|
const jsonData = {
|
|
7188
7285
|
method,
|
|
@@ -7201,7 +7298,7 @@ function useViewService() {
|
|
|
7201
7298
|
},
|
|
7202
7299
|
[env]
|
|
7203
7300
|
);
|
|
7204
|
-
const settingsWebRead2fa =
|
|
7301
|
+
const settingsWebRead2fa = useCallback67(
|
|
7205
7302
|
async ({
|
|
7206
7303
|
method,
|
|
7207
7304
|
model,
|
|
@@ -7229,7 +7326,7 @@ function useViewService() {
|
|
|
7229
7326
|
},
|
|
7230
7327
|
[env]
|
|
7231
7328
|
);
|
|
7232
|
-
const signInSSO =
|
|
7329
|
+
const signInSSO = useCallback67(
|
|
7233
7330
|
async ({
|
|
7234
7331
|
redirect_uri,
|
|
7235
7332
|
state,
|
|
@@ -7261,7 +7358,7 @@ function useViewService() {
|
|
|
7261
7358
|
},
|
|
7262
7359
|
[env]
|
|
7263
7360
|
);
|
|
7264
|
-
const verify2FA =
|
|
7361
|
+
const verify2FA = useCallback67(
|
|
7265
7362
|
({
|
|
7266
7363
|
method,
|
|
7267
7364
|
with_context,
|
|
@@ -7294,7 +7391,7 @@ function useViewService() {
|
|
|
7294
7391
|
},
|
|
7295
7392
|
[env]
|
|
7296
7393
|
);
|
|
7297
|
-
const get2FAMethods =
|
|
7394
|
+
const get2FAMethods = useCallback67(
|
|
7298
7395
|
({ method, with_context }) => {
|
|
7299
7396
|
const jsonData = {
|
|
7300
7397
|
method,
|
|
@@ -7313,7 +7410,7 @@ function useViewService() {
|
|
|
7313
7410
|
},
|
|
7314
7411
|
[env]
|
|
7315
7412
|
);
|
|
7316
|
-
const verifyTotp =
|
|
7413
|
+
const verifyTotp = useCallback67(
|
|
7317
7414
|
({
|
|
7318
7415
|
method,
|
|
7319
7416
|
action_token,
|
|
@@ -7338,7 +7435,7 @@ function useViewService() {
|
|
|
7338
7435
|
},
|
|
7339
7436
|
[env]
|
|
7340
7437
|
);
|
|
7341
|
-
const getNotifications =
|
|
7438
|
+
const getNotifications = useCallback67(
|
|
7342
7439
|
async ({
|
|
7343
7440
|
service,
|
|
7344
7441
|
xNode,
|
|
@@ -7358,7 +7455,7 @@ function useViewService() {
|
|
|
7358
7455
|
},
|
|
7359
7456
|
[env]
|
|
7360
7457
|
);
|
|
7361
|
-
const getCountry =
|
|
7458
|
+
const getCountry = useCallback67(
|
|
7362
7459
|
async ({
|
|
7363
7460
|
service,
|
|
7364
7461
|
xNode,
|
|
@@ -7385,7 +7482,7 @@ function useViewService() {
|
|
|
7385
7482
|
},
|
|
7386
7483
|
[env]
|
|
7387
7484
|
);
|
|
7388
|
-
const getCity =
|
|
7485
|
+
const getCity = useCallback67(
|
|
7389
7486
|
async ({
|
|
7390
7487
|
service,
|
|
7391
7488
|
xNode,
|
|
@@ -7412,7 +7509,7 @@ function useViewService() {
|
|
|
7412
7509
|
},
|
|
7413
7510
|
[env]
|
|
7414
7511
|
);
|
|
7415
|
-
const getWard =
|
|
7512
|
+
const getWard = useCallback67(
|
|
7416
7513
|
async ({
|
|
7417
7514
|
service,
|
|
7418
7515
|
xNode,
|
|
@@ -7437,7 +7534,7 @@ function useViewService() {
|
|
|
7437
7534
|
},
|
|
7438
7535
|
[env]
|
|
7439
7536
|
);
|
|
7440
|
-
const getPartnerTitle =
|
|
7537
|
+
const getPartnerTitle = useCallback67(
|
|
7441
7538
|
async ({
|
|
7442
7539
|
service,
|
|
7443
7540
|
xNode,
|
|
@@ -7489,10 +7586,10 @@ function useViewService() {
|
|
|
7489
7586
|
}
|
|
7490
7587
|
|
|
7491
7588
|
// src/services/dashboard-service/index.ts
|
|
7492
|
-
import { useCallback as
|
|
7589
|
+
import { useCallback as useCallback68 } from "react";
|
|
7493
7590
|
function useDashboardService() {
|
|
7494
7591
|
const { env } = useEnv();
|
|
7495
|
-
const readGroup =
|
|
7592
|
+
const readGroup = useCallback68(
|
|
7496
7593
|
async ({
|
|
7497
7594
|
service,
|
|
7498
7595
|
xNode,
|
|
@@ -7509,7 +7606,7 @@ function useDashboardService() {
|
|
|
7509
7606
|
},
|
|
7510
7607
|
[env]
|
|
7511
7608
|
);
|
|
7512
|
-
const getDataChart =
|
|
7609
|
+
const getDataChart = useCallback68(
|
|
7513
7610
|
async ({
|
|
7514
7611
|
service,
|
|
7515
7612
|
xNode,
|