@fctc/interface-logic 4.7.7 → 4.7.8
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/hooks.d.mts +5 -1
- package/dist/hooks.d.ts +5 -1
- package/dist/hooks.js +58 -14
- package/dist/hooks.mjs +57 -14
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +78 -35
- package/dist/provider.mjs +67 -24
- package/dist/services.d.mts +4 -0
- package/dist/services.d.ts +4 -0
- package/dist/services.js +137 -102
- package/dist/services.mjs +134 -99
- 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 useCallback47 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -4787,6 +4787,37 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
4787
4787
|
};
|
|
4788
4788
|
};
|
|
4789
4789
|
|
|
4790
|
+
// src/services/pos-service/supabase/add-category.ts
|
|
4791
|
+
import { useCallback as useCallback46 } from "react";
|
|
4792
|
+
var addCategorySupabaseService = () => {
|
|
4793
|
+
const supabase = useSupabaseOptional();
|
|
4794
|
+
const addCategorySupabase = useCallback46(
|
|
4795
|
+
async (values) => {
|
|
4796
|
+
if (!supabase) {
|
|
4797
|
+
console.error("Supabase client not initialized");
|
|
4798
|
+
return null;
|
|
4799
|
+
}
|
|
4800
|
+
try {
|
|
4801
|
+
const { data, error } = await supabase.from("pos_categories" /* POS_CATEGORIES */).insert({
|
|
4802
|
+
name: values.name
|
|
4803
|
+
}).select("id, name").single();
|
|
4804
|
+
if (error) {
|
|
4805
|
+
console.error("Error adding Category:", error);
|
|
4806
|
+
return null;
|
|
4807
|
+
}
|
|
4808
|
+
return [[data.id, data.name]];
|
|
4809
|
+
} catch (error) {
|
|
4810
|
+
console.error("Error adding Category:", error);
|
|
4811
|
+
return null;
|
|
4812
|
+
}
|
|
4813
|
+
},
|
|
4814
|
+
[supabase]
|
|
4815
|
+
);
|
|
4816
|
+
return {
|
|
4817
|
+
addCategorySupabase
|
|
4818
|
+
};
|
|
4819
|
+
};
|
|
4820
|
+
|
|
4790
4821
|
// src/services/pos-service/index.ts
|
|
4791
4822
|
var serviceFactories = [
|
|
4792
4823
|
addEntityService,
|
|
@@ -4825,6 +4856,7 @@ var serviceFactories = [
|
|
|
4825
4856
|
updateTableSupabaseService,
|
|
4826
4857
|
deleteFloorSupabaseService,
|
|
4827
4858
|
deleteTableSupabaseService,
|
|
4859
|
+
addCategorySupabaseService,
|
|
4828
4860
|
createOrderSupabaseService,
|
|
4829
4861
|
addProductToOrderSupabaseService,
|
|
4830
4862
|
updateOrderTotalAmountSupabaseService,
|
|
@@ -4951,24 +4983,27 @@ import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
|
4951
4983
|
// src/hooks/pos/supabase/use-create-order.ts
|
|
4952
4984
|
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
4953
4985
|
|
|
4954
|
-
// src/hooks/pos/supabase/use-add-
|
|
4986
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
4955
4987
|
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
4956
4988
|
|
|
4957
|
-
// src/hooks/pos/supabase/use-
|
|
4989
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
4958
4990
|
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
4959
4991
|
|
|
4960
|
-
// src/hooks/pos/supabase/use-update-order-
|
|
4992
|
+
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
4961
4993
|
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
4962
4994
|
|
|
4963
|
-
// src/hooks/pos/supabase/use-update-order.ts
|
|
4995
|
+
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
4964
4996
|
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
4965
4997
|
|
|
4966
|
-
// src/hooks/pos/supabase/use-
|
|
4998
|
+
// src/hooks/pos/supabase/use-update-order.ts
|
|
4967
4999
|
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
4968
5000
|
|
|
4969
|
-
// src/hooks/pos/supabase/use-delete-order
|
|
5001
|
+
// src/hooks/pos/supabase/use-delete-order.ts
|
|
4970
5002
|
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
4971
5003
|
|
|
5004
|
+
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
5005
|
+
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
5006
|
+
|
|
4972
5007
|
// src/provider/service-provider.tsx
|
|
4973
5008
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4974
5009
|
var ServiceContext = createContext3(null);
|
|
@@ -4980,7 +5015,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
4980
5015
|
// src/services/action-service/index.ts
|
|
4981
5016
|
function useActionService() {
|
|
4982
5017
|
const { env } = useEnv();
|
|
4983
|
-
const loadAction =
|
|
5018
|
+
const loadAction = useCallback47(
|
|
4984
5019
|
async ({
|
|
4985
5020
|
idAction,
|
|
4986
5021
|
context,
|
|
@@ -5004,7 +5039,7 @@ function useActionService() {
|
|
|
5004
5039
|
},
|
|
5005
5040
|
[env]
|
|
5006
5041
|
);
|
|
5007
|
-
const callButton =
|
|
5042
|
+
const callButton = useCallback47(
|
|
5008
5043
|
async ({
|
|
5009
5044
|
model,
|
|
5010
5045
|
ids = [],
|
|
@@ -5038,7 +5073,7 @@ function useActionService() {
|
|
|
5038
5073
|
},
|
|
5039
5074
|
[env]
|
|
5040
5075
|
);
|
|
5041
|
-
const removeRows =
|
|
5076
|
+
const removeRows = useCallback47(
|
|
5042
5077
|
async ({
|
|
5043
5078
|
model,
|
|
5044
5079
|
ids,
|
|
@@ -5064,7 +5099,7 @@ function useActionService() {
|
|
|
5064
5099
|
},
|
|
5065
5100
|
[env]
|
|
5066
5101
|
);
|
|
5067
|
-
const duplicateRecord =
|
|
5102
|
+
const duplicateRecord = useCallback47(
|
|
5068
5103
|
async ({
|
|
5069
5104
|
model,
|
|
5070
5105
|
id,
|
|
@@ -5090,7 +5125,7 @@ function useActionService() {
|
|
|
5090
5125
|
},
|
|
5091
5126
|
[env]
|
|
5092
5127
|
);
|
|
5093
|
-
const getPrintReportName =
|
|
5128
|
+
const getPrintReportName = useCallback47(
|
|
5094
5129
|
async ({ id }) => {
|
|
5095
5130
|
const jsonData = {
|
|
5096
5131
|
model: "ir.actions.report",
|
|
@@ -5108,7 +5143,7 @@ function useActionService() {
|
|
|
5108
5143
|
},
|
|
5109
5144
|
[env]
|
|
5110
5145
|
);
|
|
5111
|
-
const print =
|
|
5146
|
+
const print = useCallback47(
|
|
5112
5147
|
async ({ id, report, db }) => {
|
|
5113
5148
|
const jsonData = {
|
|
5114
5149
|
report,
|
|
@@ -5126,7 +5161,7 @@ function useActionService() {
|
|
|
5126
5161
|
},
|
|
5127
5162
|
[env]
|
|
5128
5163
|
);
|
|
5129
|
-
const runAction =
|
|
5164
|
+
const runAction = useCallback47(
|
|
5130
5165
|
async ({
|
|
5131
5166
|
idAction,
|
|
5132
5167
|
context,
|
|
@@ -5153,7 +5188,7 @@ function useActionService() {
|
|
|
5153
5188
|
},
|
|
5154
5189
|
[env]
|
|
5155
5190
|
);
|
|
5156
|
-
const generateSerialNumber =
|
|
5191
|
+
const generateSerialNumber = useCallback47(
|
|
5157
5192
|
async ({
|
|
5158
5193
|
kwargs,
|
|
5159
5194
|
context,
|
|
@@ -5191,11 +5226,11 @@ function useActionService() {
|
|
|
5191
5226
|
}
|
|
5192
5227
|
|
|
5193
5228
|
// src/services/auth-service/index.ts
|
|
5194
|
-
import { useCallback as
|
|
5229
|
+
import { useCallback as useCallback48 } from "react";
|
|
5195
5230
|
function useAuthService() {
|
|
5196
5231
|
const { env } = useEnv();
|
|
5197
5232
|
const supabase = useSupabaseOptional();
|
|
5198
|
-
const login =
|
|
5233
|
+
const login = useCallback48(
|
|
5199
5234
|
async (body) => {
|
|
5200
5235
|
const payload = Object.fromEntries(
|
|
5201
5236
|
Object.entries({
|
|
@@ -5220,7 +5255,7 @@ function useAuthService() {
|
|
|
5220
5255
|
},
|
|
5221
5256
|
[env]
|
|
5222
5257
|
);
|
|
5223
|
-
const loginSupabase =
|
|
5258
|
+
const loginSupabase = useCallback48(
|
|
5224
5259
|
async (body) => {
|
|
5225
5260
|
if (!supabase) {
|
|
5226
5261
|
return {
|
|
@@ -5236,7 +5271,7 @@ function useAuthService() {
|
|
|
5236
5271
|
},
|
|
5237
5272
|
[supabase]
|
|
5238
5273
|
);
|
|
5239
|
-
const forgotPassword =
|
|
5274
|
+
const forgotPassword = useCallback48(
|
|
5240
5275
|
async (email) => {
|
|
5241
5276
|
const bodyData = {
|
|
5242
5277
|
login: email,
|
|
@@ -5250,7 +5285,7 @@ function useAuthService() {
|
|
|
5250
5285
|
},
|
|
5251
5286
|
[env]
|
|
5252
5287
|
);
|
|
5253
|
-
const forgotPasswordSSO =
|
|
5288
|
+
const forgotPasswordSSO = useCallback48(
|
|
5254
5289
|
async ({
|
|
5255
5290
|
email,
|
|
5256
5291
|
with_context,
|
|
@@ -5273,7 +5308,7 @@ function useAuthService() {
|
|
|
5273
5308
|
},
|
|
5274
5309
|
[env]
|
|
5275
5310
|
);
|
|
5276
|
-
const resetPassword =
|
|
5311
|
+
const resetPassword = useCallback48(
|
|
5277
5312
|
async (data, token) => {
|
|
5278
5313
|
const bodyData = {
|
|
5279
5314
|
token,
|
|
@@ -5288,7 +5323,7 @@ function useAuthService() {
|
|
|
5288
5323
|
},
|
|
5289
5324
|
[env]
|
|
5290
5325
|
);
|
|
5291
|
-
const resetPasswordSSO =
|
|
5326
|
+
const resetPasswordSSO = useCallback48(
|
|
5292
5327
|
async ({
|
|
5293
5328
|
method,
|
|
5294
5329
|
password,
|
|
@@ -5311,7 +5346,7 @@ function useAuthService() {
|
|
|
5311
5346
|
},
|
|
5312
5347
|
[env]
|
|
5313
5348
|
);
|
|
5314
|
-
const updatePassword =
|
|
5349
|
+
const updatePassword = useCallback48(
|
|
5315
5350
|
async (data, token) => {
|
|
5316
5351
|
const bodyData = {
|
|
5317
5352
|
token,
|
|
@@ -5326,7 +5361,7 @@ function useAuthService() {
|
|
|
5326
5361
|
},
|
|
5327
5362
|
[env]
|
|
5328
5363
|
);
|
|
5329
|
-
const isValidToken =
|
|
5364
|
+
const isValidToken = useCallback48(
|
|
5330
5365
|
async (token) => {
|
|
5331
5366
|
const bodyData = {
|
|
5332
5367
|
token
|
|
@@ -5339,7 +5374,7 @@ function useAuthService() {
|
|
|
5339
5374
|
},
|
|
5340
5375
|
[env]
|
|
5341
5376
|
);
|
|
5342
|
-
const isValidActionToken =
|
|
5377
|
+
const isValidActionToken = useCallback48(
|
|
5343
5378
|
async (actionToken) => {
|
|
5344
5379
|
const bodyData = {};
|
|
5345
5380
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5352,7 +5387,7 @@ function useAuthService() {
|
|
|
5352
5387
|
},
|
|
5353
5388
|
[env]
|
|
5354
5389
|
);
|
|
5355
|
-
const loginSocial =
|
|
5390
|
+
const loginSocial = useCallback48(
|
|
5356
5391
|
async ({
|
|
5357
5392
|
db,
|
|
5358
5393
|
state,
|
|
@@ -5370,13 +5405,13 @@ function useAuthService() {
|
|
|
5370
5405
|
},
|
|
5371
5406
|
[env]
|
|
5372
5407
|
);
|
|
5373
|
-
const getProviders =
|
|
5408
|
+
const getProviders = useCallback48(
|
|
5374
5409
|
async (db) => {
|
|
5375
5410
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5376
5411
|
},
|
|
5377
5412
|
[env]
|
|
5378
5413
|
);
|
|
5379
|
-
const getAccessByCode =
|
|
5414
|
+
const getAccessByCode = useCallback48(
|
|
5380
5415
|
async (code) => {
|
|
5381
5416
|
const data = new URLSearchParams();
|
|
5382
5417
|
data.append("code", code);
|
|
@@ -5396,7 +5431,7 @@ function useAuthService() {
|
|
|
5396
5431
|
},
|
|
5397
5432
|
[env]
|
|
5398
5433
|
);
|
|
5399
|
-
const logout =
|
|
5434
|
+
const logout = useCallback48(
|
|
5400
5435
|
async (service) => {
|
|
5401
5436
|
return env?.requests?.post(
|
|
5402
5437
|
"/logout" /* LOGOUT */,
|
|
@@ -5413,7 +5448,7 @@ function useAuthService() {
|
|
|
5413
5448
|
},
|
|
5414
5449
|
[env]
|
|
5415
5450
|
);
|
|
5416
|
-
const getTenantMapping =
|
|
5451
|
+
const getTenantMapping = useCallback48(
|
|
5417
5452
|
async ({ shortName, service }) => {
|
|
5418
5453
|
const bodyData = {
|
|
5419
5454
|
short_name: shortName
|
|
@@ -5431,7 +5466,7 @@ function useAuthService() {
|
|
|
5431
5466
|
},
|
|
5432
5467
|
[env]
|
|
5433
5468
|
);
|
|
5434
|
-
const getToken =
|
|
5469
|
+
const getToken = useCallback48(
|
|
5435
5470
|
async ({
|
|
5436
5471
|
phone,
|
|
5437
5472
|
name,
|
|
@@ -5476,10 +5511,10 @@ function useAuthService() {
|
|
|
5476
5511
|
}
|
|
5477
5512
|
|
|
5478
5513
|
// src/services/company-service/index.ts
|
|
5479
|
-
import { useCallback as
|
|
5514
|
+
import { useCallback as useCallback49 } from "react";
|
|
5480
5515
|
function useCompanyService() {
|
|
5481
5516
|
const { env } = useEnv();
|
|
5482
|
-
const getCurrentCompany =
|
|
5517
|
+
const getCurrentCompany = useCallback49(
|
|
5483
5518
|
async (service, extraHeaders) => {
|
|
5484
5519
|
return await env.requests.get(
|
|
5485
5520
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5496,7 +5531,7 @@ function useCompanyService() {
|
|
|
5496
5531
|
},
|
|
5497
5532
|
[env]
|
|
5498
5533
|
);
|
|
5499
|
-
const getInfoCompany =
|
|
5534
|
+
const getInfoCompany = useCallback49(
|
|
5500
5535
|
async (id, service) => {
|
|
5501
5536
|
const jsonData = {
|
|
5502
5537
|
ids: [id],
|
|
@@ -5532,10 +5567,10 @@ function useCompanyService() {
|
|
|
5532
5567
|
}
|
|
5533
5568
|
|
|
5534
5569
|
// src/services/excel-service/index.ts
|
|
5535
|
-
import { useCallback as
|
|
5570
|
+
import { useCallback as useCallback50 } from "react";
|
|
5536
5571
|
function useExcelService() {
|
|
5537
5572
|
const { env } = useEnv();
|
|
5538
|
-
const uploadFileExcel =
|
|
5573
|
+
const uploadFileExcel = useCallback50(
|
|
5539
5574
|
async ({
|
|
5540
5575
|
formData,
|
|
5541
5576
|
service,
|
|
@@ -5552,7 +5587,7 @@ function useExcelService() {
|
|
|
5552
5587
|
},
|
|
5553
5588
|
[env]
|
|
5554
5589
|
);
|
|
5555
|
-
const uploadIdFile =
|
|
5590
|
+
const uploadIdFile = useCallback50(
|
|
5556
5591
|
async ({
|
|
5557
5592
|
formData,
|
|
5558
5593
|
service,
|
|
@@ -5569,7 +5604,7 @@ function useExcelService() {
|
|
|
5569
5604
|
},
|
|
5570
5605
|
[env]
|
|
5571
5606
|
);
|
|
5572
|
-
const parsePreview =
|
|
5607
|
+
const parsePreview = useCallback50(
|
|
5573
5608
|
async ({
|
|
5574
5609
|
id,
|
|
5575
5610
|
selectedSheet,
|
|
@@ -5618,7 +5653,7 @@ function useExcelService() {
|
|
|
5618
5653
|
},
|
|
5619
5654
|
[env]
|
|
5620
5655
|
);
|
|
5621
|
-
const executeImport =
|
|
5656
|
+
const executeImport = useCallback50(
|
|
5622
5657
|
async ({
|
|
5623
5658
|
columns,
|
|
5624
5659
|
fields,
|
|
@@ -5652,7 +5687,7 @@ function useExcelService() {
|
|
|
5652
5687
|
},
|
|
5653
5688
|
[env]
|
|
5654
5689
|
);
|
|
5655
|
-
const getFileExcel =
|
|
5690
|
+
const getFileExcel = useCallback50(
|
|
5656
5691
|
async ({
|
|
5657
5692
|
model,
|
|
5658
5693
|
service,
|
|
@@ -5676,7 +5711,7 @@ function useExcelService() {
|
|
|
5676
5711
|
},
|
|
5677
5712
|
[env]
|
|
5678
5713
|
);
|
|
5679
|
-
const getFieldExport =
|
|
5714
|
+
const getFieldExport = useCallback50(
|
|
5680
5715
|
async ({
|
|
5681
5716
|
ids,
|
|
5682
5717
|
model,
|
|
@@ -5716,7 +5751,7 @@ function useExcelService() {
|
|
|
5716
5751
|
},
|
|
5717
5752
|
[env]
|
|
5718
5753
|
);
|
|
5719
|
-
const exportExcel =
|
|
5754
|
+
const exportExcel = useCallback50(
|
|
5720
5755
|
async ({
|
|
5721
5756
|
model,
|
|
5722
5757
|
domain,
|
|
@@ -5764,10 +5799,10 @@ function useExcelService() {
|
|
|
5764
5799
|
}
|
|
5765
5800
|
|
|
5766
5801
|
// src/services/form-service/index.ts
|
|
5767
|
-
import { useCallback as
|
|
5802
|
+
import { useCallback as useCallback51 } from "react";
|
|
5768
5803
|
function useFormService() {
|
|
5769
5804
|
const { env } = useEnv();
|
|
5770
|
-
const getComment =
|
|
5805
|
+
const getComment = useCallback51(
|
|
5771
5806
|
async ({ data }) => {
|
|
5772
5807
|
const jsonData = {
|
|
5773
5808
|
thread_id: data.thread_id,
|
|
@@ -5785,7 +5820,7 @@ function useFormService() {
|
|
|
5785
5820
|
},
|
|
5786
5821
|
[env]
|
|
5787
5822
|
);
|
|
5788
|
-
const getThreadData =
|
|
5823
|
+
const getThreadData = useCallback51(
|
|
5789
5824
|
async ({
|
|
5790
5825
|
data,
|
|
5791
5826
|
xNode,
|
|
@@ -5812,7 +5847,7 @@ function useFormService() {
|
|
|
5812
5847
|
},
|
|
5813
5848
|
[env]
|
|
5814
5849
|
);
|
|
5815
|
-
const getThreadMessages =
|
|
5850
|
+
const getThreadMessages = useCallback51(
|
|
5816
5851
|
async ({
|
|
5817
5852
|
data,
|
|
5818
5853
|
xNode,
|
|
@@ -5838,7 +5873,7 @@ function useFormService() {
|
|
|
5838
5873
|
},
|
|
5839
5874
|
[env]
|
|
5840
5875
|
);
|
|
5841
|
-
const sentComment =
|
|
5876
|
+
const sentComment = useCallback51(
|
|
5842
5877
|
async ({ data }) => {
|
|
5843
5878
|
const jsonData = {
|
|
5844
5879
|
context: {
|
|
@@ -5866,7 +5901,7 @@ function useFormService() {
|
|
|
5866
5901
|
},
|
|
5867
5902
|
[env]
|
|
5868
5903
|
);
|
|
5869
|
-
const deleteComment =
|
|
5904
|
+
const deleteComment = useCallback51(
|
|
5870
5905
|
async ({ data }) => {
|
|
5871
5906
|
const jsonData = {
|
|
5872
5907
|
attachment_ids: [],
|
|
@@ -5882,7 +5917,7 @@ function useFormService() {
|
|
|
5882
5917
|
},
|
|
5883
5918
|
[env]
|
|
5884
5919
|
);
|
|
5885
|
-
const getImage =
|
|
5920
|
+
const getImage = useCallback51(
|
|
5886
5921
|
async ({ data }) => {
|
|
5887
5922
|
return env.requests.get(
|
|
5888
5923
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -5895,7 +5930,7 @@ function useFormService() {
|
|
|
5895
5930
|
},
|
|
5896
5931
|
[env]
|
|
5897
5932
|
);
|
|
5898
|
-
const uploadImage =
|
|
5933
|
+
const uploadImage = useCallback51(
|
|
5899
5934
|
async ({
|
|
5900
5935
|
formData,
|
|
5901
5936
|
service,
|
|
@@ -5914,7 +5949,7 @@ function useFormService() {
|
|
|
5914
5949
|
},
|
|
5915
5950
|
[env]
|
|
5916
5951
|
);
|
|
5917
|
-
const uploadFile =
|
|
5952
|
+
const uploadFile = useCallback51(
|
|
5918
5953
|
async ({
|
|
5919
5954
|
formData,
|
|
5920
5955
|
service,
|
|
@@ -5934,7 +5969,7 @@ function useFormService() {
|
|
|
5934
5969
|
},
|
|
5935
5970
|
[env]
|
|
5936
5971
|
);
|
|
5937
|
-
const getFormView =
|
|
5972
|
+
const getFormView = useCallback51(
|
|
5938
5973
|
async ({ data }) => {
|
|
5939
5974
|
const jsonData = {
|
|
5940
5975
|
model: data.model,
|
|
@@ -5950,7 +5985,7 @@ function useFormService() {
|
|
|
5950
5985
|
},
|
|
5951
5986
|
[env]
|
|
5952
5987
|
);
|
|
5953
|
-
const changeStatus =
|
|
5988
|
+
const changeStatus = useCallback51(
|
|
5954
5989
|
async ({ data }) => {
|
|
5955
5990
|
const vals = {
|
|
5956
5991
|
[data.name]: data.stage_id
|
|
@@ -5979,7 +6014,7 @@ function useFormService() {
|
|
|
5979
6014
|
},
|
|
5980
6015
|
[env]
|
|
5981
6016
|
);
|
|
5982
|
-
const getExternalTab =
|
|
6017
|
+
const getExternalTab = useCallback51(
|
|
5983
6018
|
async ({ method, context, service, xNode }) => {
|
|
5984
6019
|
return env?.requests?.post(
|
|
5985
6020
|
"/call" /* CALL_PATH */,
|
|
@@ -6014,10 +6049,10 @@ function useFormService() {
|
|
|
6014
6049
|
}
|
|
6015
6050
|
|
|
6016
6051
|
// src/services/kanban-service/index.ts
|
|
6017
|
-
import { useCallback as
|
|
6052
|
+
import { useCallback as useCallback52 } from "react";
|
|
6018
6053
|
function useKanbanService() {
|
|
6019
6054
|
const { env } = useEnv();
|
|
6020
|
-
const getGroups =
|
|
6055
|
+
const getGroups = useCallback52(
|
|
6021
6056
|
async ({ model, width_context }) => {
|
|
6022
6057
|
const jsonData = {
|
|
6023
6058
|
model,
|
|
@@ -6037,7 +6072,7 @@ function useKanbanService() {
|
|
|
6037
6072
|
},
|
|
6038
6073
|
[env]
|
|
6039
6074
|
);
|
|
6040
|
-
const getProgressBar =
|
|
6075
|
+
const getProgressBar = useCallback52(
|
|
6041
6076
|
async ({ field, color, model, width_context }) => {
|
|
6042
6077
|
const jsonData = {
|
|
6043
6078
|
model,
|
|
@@ -6067,10 +6102,10 @@ function useKanbanService() {
|
|
|
6067
6102
|
}
|
|
6068
6103
|
|
|
6069
6104
|
// src/services/model-service/index.ts
|
|
6070
|
-
import { useCallback as
|
|
6105
|
+
import { useCallback as useCallback53 } from "react";
|
|
6071
6106
|
function useModelService() {
|
|
6072
6107
|
const { env } = useEnv();
|
|
6073
|
-
const getListMyBankAccount =
|
|
6108
|
+
const getListMyBankAccount = useCallback53(
|
|
6074
6109
|
async ({
|
|
6075
6110
|
domain,
|
|
6076
6111
|
spectification,
|
|
@@ -6094,7 +6129,7 @@ function useModelService() {
|
|
|
6094
6129
|
},
|
|
6095
6130
|
[env]
|
|
6096
6131
|
);
|
|
6097
|
-
const getCurrency =
|
|
6132
|
+
const getCurrency = useCallback53(async () => {
|
|
6098
6133
|
const jsonData = {
|
|
6099
6134
|
model: "res.currency",
|
|
6100
6135
|
method: "web_search_read",
|
|
@@ -6114,7 +6149,7 @@ function useModelService() {
|
|
|
6114
6149
|
}
|
|
6115
6150
|
});
|
|
6116
6151
|
}, [env]);
|
|
6117
|
-
const getConversionRate =
|
|
6152
|
+
const getConversionRate = useCallback53(async () => {
|
|
6118
6153
|
const jsonData = {
|
|
6119
6154
|
model: "res.currency",
|
|
6120
6155
|
method: "web_search_read",
|
|
@@ -6140,7 +6175,7 @@ function useModelService() {
|
|
|
6140
6175
|
}
|
|
6141
6176
|
});
|
|
6142
6177
|
}, [env]);
|
|
6143
|
-
const getAll =
|
|
6178
|
+
const getAll = useCallback53(
|
|
6144
6179
|
async ({
|
|
6145
6180
|
data,
|
|
6146
6181
|
service,
|
|
@@ -6182,7 +6217,7 @@ function useModelService() {
|
|
|
6182
6217
|
},
|
|
6183
6218
|
[env]
|
|
6184
6219
|
);
|
|
6185
|
-
const getListCalendar =
|
|
6220
|
+
const getListCalendar = useCallback53(
|
|
6186
6221
|
async ({ data }) => {
|
|
6187
6222
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6188
6223
|
fields: data.fields,
|
|
@@ -6213,7 +6248,7 @@ function useModelService() {
|
|
|
6213
6248
|
},
|
|
6214
6249
|
[env]
|
|
6215
6250
|
);
|
|
6216
|
-
const getList =
|
|
6251
|
+
const getList = useCallback53(
|
|
6217
6252
|
async ({
|
|
6218
6253
|
model,
|
|
6219
6254
|
ids = [],
|
|
@@ -6245,7 +6280,7 @@ function useModelService() {
|
|
|
6245
6280
|
},
|
|
6246
6281
|
[env]
|
|
6247
6282
|
);
|
|
6248
|
-
const getDetail =
|
|
6283
|
+
const getDetail = useCallback53(
|
|
6249
6284
|
async ({
|
|
6250
6285
|
ids = [],
|
|
6251
6286
|
model,
|
|
@@ -6277,7 +6312,7 @@ function useModelService() {
|
|
|
6277
6312
|
},
|
|
6278
6313
|
[env]
|
|
6279
6314
|
);
|
|
6280
|
-
const save =
|
|
6315
|
+
const save = useCallback53(
|
|
6281
6316
|
async ({
|
|
6282
6317
|
model,
|
|
6283
6318
|
ids = [],
|
|
@@ -6312,7 +6347,7 @@ function useModelService() {
|
|
|
6312
6347
|
},
|
|
6313
6348
|
[env]
|
|
6314
6349
|
);
|
|
6315
|
-
const deleteApi =
|
|
6350
|
+
const deleteApi = useCallback53(
|
|
6316
6351
|
async ({ ids = [], model, service }) => {
|
|
6317
6352
|
const jsonData = {
|
|
6318
6353
|
model,
|
|
@@ -6332,7 +6367,7 @@ function useModelService() {
|
|
|
6332
6367
|
},
|
|
6333
6368
|
[env]
|
|
6334
6369
|
);
|
|
6335
|
-
const onChange =
|
|
6370
|
+
const onChange = useCallback53(
|
|
6336
6371
|
async ({
|
|
6337
6372
|
ids = [],
|
|
6338
6373
|
model,
|
|
@@ -6368,7 +6403,7 @@ function useModelService() {
|
|
|
6368
6403
|
},
|
|
6369
6404
|
[env]
|
|
6370
6405
|
);
|
|
6371
|
-
const getListFieldsOnchange =
|
|
6406
|
+
const getListFieldsOnchange = useCallback53(
|
|
6372
6407
|
async ({
|
|
6373
6408
|
model,
|
|
6374
6409
|
service,
|
|
@@ -6392,7 +6427,7 @@ function useModelService() {
|
|
|
6392
6427
|
},
|
|
6393
6428
|
[env]
|
|
6394
6429
|
);
|
|
6395
|
-
const parseORMOdoo =
|
|
6430
|
+
const parseORMOdoo = useCallback53((data) => {
|
|
6396
6431
|
for (const key in data) {
|
|
6397
6432
|
if (key === "display_name") {
|
|
6398
6433
|
delete data[key];
|
|
@@ -6403,7 +6438,7 @@ function useModelService() {
|
|
|
6403
6438
|
}
|
|
6404
6439
|
return { ...data };
|
|
6405
6440
|
}, []);
|
|
6406
|
-
const toDataJS =
|
|
6441
|
+
const toDataJS = useCallback53(
|
|
6407
6442
|
(data, viewData, model) => {
|
|
6408
6443
|
for (const key in data) {
|
|
6409
6444
|
if (data[key] === false) {
|
|
@@ -6461,10 +6496,10 @@ function useModelService() {
|
|
|
6461
6496
|
}
|
|
6462
6497
|
|
|
6463
6498
|
// src/services/user-service/index.ts
|
|
6464
|
-
import { useCallback as
|
|
6499
|
+
import { useCallback as useCallback54 } from "react";
|
|
6465
6500
|
function useUserService() {
|
|
6466
6501
|
const { env } = useEnv();
|
|
6467
|
-
const getProfile =
|
|
6502
|
+
const getProfile = useCallback54(
|
|
6468
6503
|
async (service, path, extraHeaders) => {
|
|
6469
6504
|
return env?.requests?.get(
|
|
6470
6505
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6481,7 +6516,7 @@ function useUserService() {
|
|
|
6481
6516
|
},
|
|
6482
6517
|
[env]
|
|
6483
6518
|
);
|
|
6484
|
-
const getUser =
|
|
6519
|
+
const getUser = useCallback54(
|
|
6485
6520
|
async ({ context, id }) => {
|
|
6486
6521
|
const jsonData = {
|
|
6487
6522
|
model: "res.users",
|
|
@@ -6519,7 +6554,7 @@ function useUserService() {
|
|
|
6519
6554
|
},
|
|
6520
6555
|
[env]
|
|
6521
6556
|
);
|
|
6522
|
-
const switchUserLocale =
|
|
6557
|
+
const switchUserLocale = useCallback54(
|
|
6523
6558
|
async ({ id, values, service }) => {
|
|
6524
6559
|
const jsonData = {
|
|
6525
6560
|
model: "res.users",
|
|
@@ -6547,10 +6582,10 @@ function useUserService() {
|
|
|
6547
6582
|
}
|
|
6548
6583
|
|
|
6549
6584
|
// src/services/view-service/index.ts
|
|
6550
|
-
import { useCallback as
|
|
6585
|
+
import { useCallback as useCallback55 } from "react";
|
|
6551
6586
|
function useViewService() {
|
|
6552
6587
|
const { env } = useEnv();
|
|
6553
|
-
const getView =
|
|
6588
|
+
const getView = useCallback55(
|
|
6554
6589
|
async ({
|
|
6555
6590
|
model,
|
|
6556
6591
|
views,
|
|
@@ -6590,7 +6625,7 @@ function useViewService() {
|
|
|
6590
6625
|
},
|
|
6591
6626
|
[env]
|
|
6592
6627
|
);
|
|
6593
|
-
const getMenu =
|
|
6628
|
+
const getMenu = useCallback55(
|
|
6594
6629
|
async (context, specification, domain, service) => {
|
|
6595
6630
|
const jsonData = {
|
|
6596
6631
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6621,7 +6656,7 @@ function useViewService() {
|
|
|
6621
6656
|
},
|
|
6622
6657
|
[env]
|
|
6623
6658
|
);
|
|
6624
|
-
const getActionDetail =
|
|
6659
|
+
const getActionDetail = useCallback55(
|
|
6625
6660
|
async (aid, context) => {
|
|
6626
6661
|
const jsonData = {
|
|
6627
6662
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6651,7 +6686,7 @@ function useViewService() {
|
|
|
6651
6686
|
},
|
|
6652
6687
|
[env]
|
|
6653
6688
|
);
|
|
6654
|
-
const getResequence =
|
|
6689
|
+
const getResequence = useCallback55(
|
|
6655
6690
|
async ({
|
|
6656
6691
|
model,
|
|
6657
6692
|
ids,
|
|
@@ -6681,7 +6716,7 @@ function useViewService() {
|
|
|
6681
6716
|
},
|
|
6682
6717
|
[env]
|
|
6683
6718
|
);
|
|
6684
|
-
const getSelectionItem =
|
|
6719
|
+
const getSelectionItem = useCallback55(
|
|
6685
6720
|
async ({
|
|
6686
6721
|
data,
|
|
6687
6722
|
service,
|
|
@@ -6718,7 +6753,7 @@ function useViewService() {
|
|
|
6718
6753
|
},
|
|
6719
6754
|
[env]
|
|
6720
6755
|
);
|
|
6721
|
-
const loadMessages =
|
|
6756
|
+
const loadMessages = useCallback55(async () => {
|
|
6722
6757
|
return env.requests.post(
|
|
6723
6758
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6724
6759
|
{},
|
|
@@ -6729,14 +6764,14 @@ function useViewService() {
|
|
|
6729
6764
|
}
|
|
6730
6765
|
);
|
|
6731
6766
|
}, [env]);
|
|
6732
|
-
const getVersion =
|
|
6767
|
+
const getVersion = useCallback55(async () => {
|
|
6733
6768
|
return env?.requests?.get("", {
|
|
6734
6769
|
headers: {
|
|
6735
6770
|
"Content-Type": "application/json"
|
|
6736
6771
|
}
|
|
6737
6772
|
});
|
|
6738
6773
|
}, [env]);
|
|
6739
|
-
const grantAccess =
|
|
6774
|
+
const grantAccess = useCallback55(
|
|
6740
6775
|
async ({
|
|
6741
6776
|
redirect_uri,
|
|
6742
6777
|
state,
|
|
@@ -6763,7 +6798,7 @@ function useViewService() {
|
|
|
6763
6798
|
},
|
|
6764
6799
|
[env]
|
|
6765
6800
|
);
|
|
6766
|
-
const removeTotpSetUp =
|
|
6801
|
+
const removeTotpSetUp = useCallback55(
|
|
6767
6802
|
async ({ method, token }) => {
|
|
6768
6803
|
const jsonData = {
|
|
6769
6804
|
method,
|
|
@@ -6784,7 +6819,7 @@ function useViewService() {
|
|
|
6784
6819
|
},
|
|
6785
6820
|
[env]
|
|
6786
6821
|
);
|
|
6787
|
-
const requestSetupTotp =
|
|
6822
|
+
const requestSetupTotp = useCallback55(
|
|
6788
6823
|
async ({ method, token }) => {
|
|
6789
6824
|
const jsonData = {
|
|
6790
6825
|
method,
|
|
@@ -6803,7 +6838,7 @@ function useViewService() {
|
|
|
6803
6838
|
},
|
|
6804
6839
|
[env]
|
|
6805
6840
|
);
|
|
6806
|
-
const settingsWebRead2fa =
|
|
6841
|
+
const settingsWebRead2fa = useCallback55(
|
|
6807
6842
|
async ({
|
|
6808
6843
|
method,
|
|
6809
6844
|
model,
|
|
@@ -6831,7 +6866,7 @@ function useViewService() {
|
|
|
6831
6866
|
},
|
|
6832
6867
|
[env]
|
|
6833
6868
|
);
|
|
6834
|
-
const signInSSO =
|
|
6869
|
+
const signInSSO = useCallback55(
|
|
6835
6870
|
async ({
|
|
6836
6871
|
redirect_uri,
|
|
6837
6872
|
state,
|
|
@@ -6863,7 +6898,7 @@ function useViewService() {
|
|
|
6863
6898
|
},
|
|
6864
6899
|
[env]
|
|
6865
6900
|
);
|
|
6866
|
-
const verify2FA =
|
|
6901
|
+
const verify2FA = useCallback55(
|
|
6867
6902
|
({
|
|
6868
6903
|
method,
|
|
6869
6904
|
with_context,
|
|
@@ -6896,7 +6931,7 @@ function useViewService() {
|
|
|
6896
6931
|
},
|
|
6897
6932
|
[env]
|
|
6898
6933
|
);
|
|
6899
|
-
const get2FAMethods =
|
|
6934
|
+
const get2FAMethods = useCallback55(
|
|
6900
6935
|
({ method, with_context }) => {
|
|
6901
6936
|
const jsonData = {
|
|
6902
6937
|
method,
|
|
@@ -6915,7 +6950,7 @@ function useViewService() {
|
|
|
6915
6950
|
},
|
|
6916
6951
|
[env]
|
|
6917
6952
|
);
|
|
6918
|
-
const verifyTotp =
|
|
6953
|
+
const verifyTotp = useCallback55(
|
|
6919
6954
|
({
|
|
6920
6955
|
method,
|
|
6921
6956
|
action_token,
|
|
@@ -6940,7 +6975,7 @@ function useViewService() {
|
|
|
6940
6975
|
},
|
|
6941
6976
|
[env]
|
|
6942
6977
|
);
|
|
6943
|
-
const getNotifications =
|
|
6978
|
+
const getNotifications = useCallback55(
|
|
6944
6979
|
async ({
|
|
6945
6980
|
service,
|
|
6946
6981
|
xNode,
|
|
@@ -6960,7 +6995,7 @@ function useViewService() {
|
|
|
6960
6995
|
},
|
|
6961
6996
|
[env]
|
|
6962
6997
|
);
|
|
6963
|
-
const getCountry =
|
|
6998
|
+
const getCountry = useCallback55(
|
|
6964
6999
|
async ({
|
|
6965
7000
|
service,
|
|
6966
7001
|
xNode,
|
|
@@ -6987,7 +7022,7 @@ function useViewService() {
|
|
|
6987
7022
|
},
|
|
6988
7023
|
[env]
|
|
6989
7024
|
);
|
|
6990
|
-
const getCity =
|
|
7025
|
+
const getCity = useCallback55(
|
|
6991
7026
|
async ({
|
|
6992
7027
|
service,
|
|
6993
7028
|
xNode,
|
|
@@ -7014,7 +7049,7 @@ function useViewService() {
|
|
|
7014
7049
|
},
|
|
7015
7050
|
[env]
|
|
7016
7051
|
);
|
|
7017
|
-
const getWard =
|
|
7052
|
+
const getWard = useCallback55(
|
|
7018
7053
|
async ({
|
|
7019
7054
|
service,
|
|
7020
7055
|
xNode,
|
|
@@ -7039,7 +7074,7 @@ function useViewService() {
|
|
|
7039
7074
|
},
|
|
7040
7075
|
[env]
|
|
7041
7076
|
);
|
|
7042
|
-
const getPartnerTitle =
|
|
7077
|
+
const getPartnerTitle = useCallback55(
|
|
7043
7078
|
async ({
|
|
7044
7079
|
service,
|
|
7045
7080
|
xNode,
|
|
@@ -7091,10 +7126,10 @@ function useViewService() {
|
|
|
7091
7126
|
}
|
|
7092
7127
|
|
|
7093
7128
|
// src/services/dashboard-service/index.ts
|
|
7094
|
-
import { useCallback as
|
|
7129
|
+
import { useCallback as useCallback56 } from "react";
|
|
7095
7130
|
function useDashboardService() {
|
|
7096
7131
|
const { env } = useEnv();
|
|
7097
|
-
const readGroup =
|
|
7132
|
+
const readGroup = useCallback56(
|
|
7098
7133
|
async ({
|
|
7099
7134
|
service,
|
|
7100
7135
|
xNode,
|
|
@@ -7111,7 +7146,7 @@ function useDashboardService() {
|
|
|
7111
7146
|
},
|
|
7112
7147
|
[env]
|
|
7113
7148
|
);
|
|
7114
|
-
const getDataChart =
|
|
7149
|
+
const getDataChart = useCallback56(
|
|
7115
7150
|
async ({
|
|
7116
7151
|
service,
|
|
7117
7152
|
xNode,
|