@fctc/interface-logic 4.7.9 → 4.8.1
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 +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +18 -1
- package/dist/hooks.d.ts +18 -1
- package/dist/hooks.js +138 -60
- package/dist/hooks.mjs +136 -60
- package/dist/provider.d.mts +3 -1
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +158 -82
- package/dist/provider.mjs +147 -71
- package/dist/services.d.mts +17 -0
- package/dist/services.d.ts +17 -0
- package/dist/services.js +214 -154
- package/dist/services.mjs +211 -151
- 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_react56 = require("react");
|
|
49
49
|
|
|
50
50
|
// src/constants/api/uri-constant.ts
|
|
51
51
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -90,6 +90,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
90
90
|
UriConstants2["READ_GROUP"] = "/read_group";
|
|
91
91
|
UriConstants2["GET_NOTIFICATION"] = "/mail/data";
|
|
92
92
|
UriConstants2["PUBLIC_USER_INFO"] = "/public/user/info";
|
|
93
|
+
UriConstants2["FUNCTIONAL_MODULES"] = "/functional-modules";
|
|
93
94
|
return UriConstants2;
|
|
94
95
|
})(UriConstants || {});
|
|
95
96
|
|
|
@@ -2955,7 +2956,7 @@ function useEnv() {
|
|
|
2955
2956
|
}
|
|
2956
2957
|
|
|
2957
2958
|
// src/provider/service-provider.tsx
|
|
2958
|
-
var
|
|
2959
|
+
var import_react54 = require("react");
|
|
2959
2960
|
|
|
2960
2961
|
// src/hooks/auth/use-forgot-password.ts
|
|
2961
2962
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -4406,11 +4407,34 @@ var completeCurrentStageService = (env) => {
|
|
|
4406
4407
|
};
|
|
4407
4408
|
};
|
|
4408
4409
|
|
|
4409
|
-
// src/services/pos-service/
|
|
4410
|
+
// src/services/pos-service/get-functional-modules.ts
|
|
4410
4411
|
var import_react37 = require("react");
|
|
4412
|
+
var getFunctionalModulesService = (env) => {
|
|
4413
|
+
const getFunctionalModules = (0, import_react37.useCallback)(
|
|
4414
|
+
async ({ xNode, service }) => {
|
|
4415
|
+
return env?.requests.get(
|
|
4416
|
+
"/functional-modules" /* FUNCTIONAL_MODULES */,
|
|
4417
|
+
{
|
|
4418
|
+
headers: {
|
|
4419
|
+
"Content-Type": "application/json",
|
|
4420
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4421
|
+
}
|
|
4422
|
+
},
|
|
4423
|
+
service
|
|
4424
|
+
);
|
|
4425
|
+
},
|
|
4426
|
+
[env]
|
|
4427
|
+
);
|
|
4428
|
+
return {
|
|
4429
|
+
getFunctionalModules
|
|
4430
|
+
};
|
|
4431
|
+
};
|
|
4432
|
+
|
|
4433
|
+
// src/services/pos-service/supabase/add-floor.ts
|
|
4434
|
+
var import_react38 = require("react");
|
|
4411
4435
|
var addFloorSupabaseService = () => {
|
|
4412
4436
|
const supabase = useSupabaseOptional();
|
|
4413
|
-
const addFloorSupabase = (0,
|
|
4437
|
+
const addFloorSupabase = (0, import_react38.useCallback)(
|
|
4414
4438
|
async (values) => {
|
|
4415
4439
|
if (!supabase) {
|
|
4416
4440
|
console.error("Supabase client not initialized");
|
|
@@ -4441,10 +4465,10 @@ var addFloorSupabaseService = () => {
|
|
|
4441
4465
|
};
|
|
4442
4466
|
|
|
4443
4467
|
// src/services/pos-service/supabase/add-table.ts
|
|
4444
|
-
var
|
|
4468
|
+
var import_react39 = require("react");
|
|
4445
4469
|
var addTableSupabaseService = () => {
|
|
4446
4470
|
const supabase = useSupabaseOptional();
|
|
4447
|
-
const addTableSupabase = (0,
|
|
4471
|
+
const addTableSupabase = (0, import_react39.useCallback)(
|
|
4448
4472
|
async (values) => {
|
|
4449
4473
|
if (!supabase) {
|
|
4450
4474
|
console.error("Supabase client not initialized");
|
|
@@ -4474,10 +4498,10 @@ var addTableSupabaseService = () => {
|
|
|
4474
4498
|
};
|
|
4475
4499
|
|
|
4476
4500
|
// src/services/pos-service/supabase/update-floor.ts
|
|
4477
|
-
var
|
|
4501
|
+
var import_react40 = require("react");
|
|
4478
4502
|
var updateFloorSupabaseService = () => {
|
|
4479
4503
|
const supabase = useSupabaseOptional();
|
|
4480
|
-
const updateFloorSupabase = (0,
|
|
4504
|
+
const updateFloorSupabase = (0, import_react40.useCallback)(
|
|
4481
4505
|
async (values) => {
|
|
4482
4506
|
if (!supabase) {
|
|
4483
4507
|
console.error("Supabase client not initialized");
|
|
@@ -4504,10 +4528,10 @@ var updateFloorSupabaseService = () => {
|
|
|
4504
4528
|
};
|
|
4505
4529
|
|
|
4506
4530
|
// src/services/pos-service/supabase/update-table.ts
|
|
4507
|
-
var
|
|
4531
|
+
var import_react41 = require("react");
|
|
4508
4532
|
var updateTableSupabaseService = () => {
|
|
4509
4533
|
const supabase = useSupabaseOptional();
|
|
4510
|
-
const updateTableSupabase = (0,
|
|
4534
|
+
const updateTableSupabase = (0, import_react41.useCallback)(
|
|
4511
4535
|
async (values) => {
|
|
4512
4536
|
if (!supabase) {
|
|
4513
4537
|
console.error("Supabase client not initialized");
|
|
@@ -4534,10 +4558,10 @@ var updateTableSupabaseService = () => {
|
|
|
4534
4558
|
};
|
|
4535
4559
|
|
|
4536
4560
|
// src/services/pos-service/supabase/delete-floor.ts
|
|
4537
|
-
var
|
|
4561
|
+
var import_react42 = require("react");
|
|
4538
4562
|
var deleteFloorSupabaseService = () => {
|
|
4539
4563
|
const supabase = useSupabaseOptional();
|
|
4540
|
-
const deleteFloorSupabase = (0,
|
|
4564
|
+
const deleteFloorSupabase = (0, import_react42.useCallback)(
|
|
4541
4565
|
async (values) => {
|
|
4542
4566
|
if (!supabase) {
|
|
4543
4567
|
console.error("Supabase client not initialized");
|
|
@@ -4563,10 +4587,10 @@ var deleteFloorSupabaseService = () => {
|
|
|
4563
4587
|
};
|
|
4564
4588
|
|
|
4565
4589
|
// src/services/pos-service/supabase/delete-table.ts
|
|
4566
|
-
var
|
|
4590
|
+
var import_react43 = require("react");
|
|
4567
4591
|
var deleteTableSupabaseService = () => {
|
|
4568
4592
|
const supabase = useSupabaseOptional();
|
|
4569
|
-
const deleteTableSupabase = (0,
|
|
4593
|
+
const deleteTableSupabase = (0, import_react43.useCallback)(
|
|
4570
4594
|
async (values) => {
|
|
4571
4595
|
if (!supabase) {
|
|
4572
4596
|
console.error("Supabase client not initialized");
|
|
@@ -4592,10 +4616,10 @@ var deleteTableSupabaseService = () => {
|
|
|
4592
4616
|
};
|
|
4593
4617
|
|
|
4594
4618
|
// src/services/pos-service/supabase/create-order.ts
|
|
4595
|
-
var
|
|
4619
|
+
var import_react44 = require("react");
|
|
4596
4620
|
var createOrderSupabaseService = () => {
|
|
4597
4621
|
const supabase = useSupabaseOptional();
|
|
4598
|
-
const createOrderSupabase = (0,
|
|
4622
|
+
const createOrderSupabase = (0, import_react44.useCallback)(
|
|
4599
4623
|
async (values) => {
|
|
4600
4624
|
if (!supabase) {
|
|
4601
4625
|
console.error("Supabase client not initialized");
|
|
@@ -4603,7 +4627,6 @@ var createOrderSupabaseService = () => {
|
|
|
4603
4627
|
}
|
|
4604
4628
|
try {
|
|
4605
4629
|
const { data, error } = await supabase.from("orders" /* ORDERS */).insert({
|
|
4606
|
-
name: values.pos_reference,
|
|
4607
4630
|
session_id: values.session_id,
|
|
4608
4631
|
pos_reference: values.pos_reference,
|
|
4609
4632
|
amount_tax: values.amount_tax,
|
|
@@ -4611,8 +4634,7 @@ var createOrderSupabaseService = () => {
|
|
|
4611
4634
|
amount_paid: values.amount_paid,
|
|
4612
4635
|
amount_return: values.amount_return,
|
|
4613
4636
|
table_id: values.table_id,
|
|
4614
|
-
partner_id: values.partner_id
|
|
4615
|
-
date_order: (/* @__PURE__ */ new Date()).toISOString()
|
|
4637
|
+
partner_id: values.partner_id
|
|
4616
4638
|
}).select("id, pos_reference").single();
|
|
4617
4639
|
if (error) {
|
|
4618
4640
|
console.error("Error creating order:", error);
|
|
@@ -4632,10 +4654,10 @@ var createOrderSupabaseService = () => {
|
|
|
4632
4654
|
};
|
|
4633
4655
|
|
|
4634
4656
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4635
|
-
var
|
|
4657
|
+
var import_react45 = require("react");
|
|
4636
4658
|
var addProductToOrderSupabaseService = () => {
|
|
4637
4659
|
const supabase = useSupabaseOptional();
|
|
4638
|
-
const addProductToOrderSupabase = (0,
|
|
4660
|
+
const addProductToOrderSupabase = (0, import_react45.useCallback)(
|
|
4639
4661
|
async (values) => {
|
|
4640
4662
|
if (!supabase) {
|
|
4641
4663
|
console.error("Supabase client not initialized");
|
|
@@ -4672,10 +4694,10 @@ var addProductToOrderSupabaseService = () => {
|
|
|
4672
4694
|
};
|
|
4673
4695
|
|
|
4674
4696
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4675
|
-
var
|
|
4697
|
+
var import_react46 = require("react");
|
|
4676
4698
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
4677
4699
|
const supabase = useSupabaseOptional();
|
|
4678
|
-
const updateOrderTotalAmountSupabase = (0,
|
|
4700
|
+
const updateOrderTotalAmountSupabase = (0, import_react46.useCallback)(
|
|
4679
4701
|
async (values) => {
|
|
4680
4702
|
if (!supabase) {
|
|
4681
4703
|
console.error("Supabase client not initialized");
|
|
@@ -4705,10 +4727,10 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
4705
4727
|
};
|
|
4706
4728
|
|
|
4707
4729
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
4708
|
-
var
|
|
4730
|
+
var import_react47 = require("react");
|
|
4709
4731
|
var updateOrderLineSupabaseService = () => {
|
|
4710
4732
|
const supabase = useSupabaseOptional();
|
|
4711
|
-
const updateOrderLineSupabase = (0,
|
|
4733
|
+
const updateOrderLineSupabase = (0, import_react47.useCallback)(
|
|
4712
4734
|
async (values) => {
|
|
4713
4735
|
if (!supabase) {
|
|
4714
4736
|
console.error("Supabase client not initialized");
|
|
@@ -4740,22 +4762,20 @@ var updateOrderLineSupabaseService = () => {
|
|
|
4740
4762
|
};
|
|
4741
4763
|
|
|
4742
4764
|
// src/services/pos-service/supabase/update-order.ts
|
|
4743
|
-
var
|
|
4765
|
+
var import_react48 = require("react");
|
|
4744
4766
|
var updateOrderSupabaseService = () => {
|
|
4745
4767
|
const supabase = useSupabaseOptional();
|
|
4746
|
-
const updateOrderSupabase = (0,
|
|
4768
|
+
const updateOrderSupabase = (0, import_react48.useCallback)(
|
|
4747
4769
|
async (values) => {
|
|
4748
4770
|
if (!supabase) {
|
|
4749
4771
|
console.error("Supabase client not initialized");
|
|
4750
4772
|
return [];
|
|
4751
4773
|
}
|
|
4752
4774
|
const { order_id, ...rest } = values;
|
|
4753
|
-
const updateData =
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
}).filter(([_, v]) => v !== void 0)
|
|
4758
|
-
);
|
|
4775
|
+
const updateData = cleanObject({
|
|
4776
|
+
...rest,
|
|
4777
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4778
|
+
});
|
|
4759
4779
|
try {
|
|
4760
4780
|
const { error, data } = await supabase.from("orders" /* ORDERS */).update(updateData).eq("id", order_id).select("id").single();
|
|
4761
4781
|
if (error) {
|
|
@@ -4776,10 +4796,10 @@ var updateOrderSupabaseService = () => {
|
|
|
4776
4796
|
};
|
|
4777
4797
|
|
|
4778
4798
|
// src/services/pos-service/supabase/delete-order.ts
|
|
4779
|
-
var
|
|
4799
|
+
var import_react49 = require("react");
|
|
4780
4800
|
var deleteOrderSupabaseService = () => {
|
|
4781
4801
|
const supabase = useSupabaseOptional();
|
|
4782
|
-
const deleteOrderSupabase = (0,
|
|
4802
|
+
const deleteOrderSupabase = (0, import_react49.useCallback)(
|
|
4783
4803
|
async (values) => {
|
|
4784
4804
|
if (!supabase) {
|
|
4785
4805
|
console.error("Supabase client not initialized");
|
|
@@ -4805,10 +4825,10 @@ var deleteOrderSupabaseService = () => {
|
|
|
4805
4825
|
};
|
|
4806
4826
|
|
|
4807
4827
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4808
|
-
var
|
|
4828
|
+
var import_react50 = require("react");
|
|
4809
4829
|
var deleteOrderLineSupabaseService = () => {
|
|
4810
4830
|
const supabase = useSupabaseOptional();
|
|
4811
|
-
const deleteOrderLineSupabase = (0,
|
|
4831
|
+
const deleteOrderLineSupabase = (0, import_react50.useCallback)(
|
|
4812
4832
|
async (values) => {
|
|
4813
4833
|
if (!supabase) {
|
|
4814
4834
|
console.error("Supabase client not initialized");
|
|
@@ -4834,10 +4854,10 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
4834
4854
|
};
|
|
4835
4855
|
|
|
4836
4856
|
// src/services/pos-service/supabase/add-category.ts
|
|
4837
|
-
var
|
|
4857
|
+
var import_react51 = require("react");
|
|
4838
4858
|
var addCategorySupabaseService = () => {
|
|
4839
4859
|
const supabase = useSupabaseOptional();
|
|
4840
|
-
const addCategorySupabase = (0,
|
|
4860
|
+
const addCategorySupabase = (0, import_react51.useCallback)(
|
|
4841
4861
|
async (values) => {
|
|
4842
4862
|
if (!supabase) {
|
|
4843
4863
|
console.error("Supabase client not initialized");
|
|
@@ -4865,33 +4885,31 @@ var addCategorySupabaseService = () => {
|
|
|
4865
4885
|
};
|
|
4866
4886
|
|
|
4867
4887
|
// src/services/pos-service/supabase/add-product.ts
|
|
4868
|
-
var
|
|
4888
|
+
var import_react52 = require("react");
|
|
4869
4889
|
var addProductSupabaseService = () => {
|
|
4870
4890
|
const supabase = useSupabaseOptional();
|
|
4871
|
-
const addProductSupabase = (0,
|
|
4891
|
+
const addProductSupabase = (0, import_react52.useCallback)(
|
|
4872
4892
|
async (values) => {
|
|
4873
4893
|
if (!supabase) {
|
|
4874
4894
|
console.error("Supabase client not initialized");
|
|
4875
4895
|
return null;
|
|
4876
4896
|
}
|
|
4877
|
-
const insertData =
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
}).filter(([_, v]) => v !== void 0)
|
|
4894
|
-
);
|
|
4897
|
+
const insertData = cleanObject({
|
|
4898
|
+
name: values.name,
|
|
4899
|
+
product_tmpl_id: values.product_tmpl_id,
|
|
4900
|
+
product_template_variant_value_ids: values.product_template_variant_value_ids ?? [],
|
|
4901
|
+
combo_ids: values.combo_ids ?? [],
|
|
4902
|
+
categ_id: values.categ_id,
|
|
4903
|
+
pos_categ_ids: values.pos_categ_ids ?? [],
|
|
4904
|
+
display_name: values.display_name || values.name,
|
|
4905
|
+
default_code: values.default_code ?? "",
|
|
4906
|
+
description_sale: values.description_sale ?? "",
|
|
4907
|
+
lst_price: values.lst_price ?? 0,
|
|
4908
|
+
standard_price: values.standard_price ?? 0,
|
|
4909
|
+
barcode: values.barcode ?? "",
|
|
4910
|
+
image_url: values.image_url ?? "",
|
|
4911
|
+
active: values.active ?? true
|
|
4912
|
+
});
|
|
4895
4913
|
try {
|
|
4896
4914
|
const { data, error } = await supabase.from("products" /* PRODUCTS */).insert(insertData).select("id, name").single();
|
|
4897
4915
|
if (error) {
|
|
@@ -4911,6 +4929,40 @@ var addProductSupabaseService = () => {
|
|
|
4911
4929
|
};
|
|
4912
4930
|
};
|
|
4913
4931
|
|
|
4932
|
+
// src/services/pos-service/supabase/add-payment-method.ts
|
|
4933
|
+
var import_react53 = require("react");
|
|
4934
|
+
var addPaymentMethodSupabaseService = () => {
|
|
4935
|
+
const supabase = useSupabaseOptional();
|
|
4936
|
+
const addPaymentMethodSupabase = (0, import_react53.useCallback)(
|
|
4937
|
+
async (values) => {
|
|
4938
|
+
if (!supabase) {
|
|
4939
|
+
console.error("Supabase client not initialized");
|
|
4940
|
+
return null;
|
|
4941
|
+
}
|
|
4942
|
+
const { name, ...rest } = values;
|
|
4943
|
+
const insertData = cleanObject({
|
|
4944
|
+
name,
|
|
4945
|
+
...rest
|
|
4946
|
+
});
|
|
4947
|
+
try {
|
|
4948
|
+
const { data, error } = await supabase.from("payment_methods" /* PAYMENT_METHODS */).insert(insertData).select("id, name").single();
|
|
4949
|
+
if (error) {
|
|
4950
|
+
console.error("Error adding payment method:", error);
|
|
4951
|
+
return null;
|
|
4952
|
+
}
|
|
4953
|
+
return [[data.id, data.name]];
|
|
4954
|
+
} catch (error) {
|
|
4955
|
+
console.error("Error adding payment method:", error);
|
|
4956
|
+
return null;
|
|
4957
|
+
}
|
|
4958
|
+
},
|
|
4959
|
+
[supabase]
|
|
4960
|
+
);
|
|
4961
|
+
return {
|
|
4962
|
+
addPaymentMethodSupabase
|
|
4963
|
+
};
|
|
4964
|
+
};
|
|
4965
|
+
|
|
4914
4966
|
// src/services/pos-service/index.ts
|
|
4915
4967
|
var serviceFactories = [
|
|
4916
4968
|
addEntityService,
|
|
@@ -4957,7 +5009,9 @@ var serviceFactories = [
|
|
|
4957
5009
|
updateOrderSupabaseService,
|
|
4958
5010
|
deleteOrderSupabaseService,
|
|
4959
5011
|
deleteOrderLineSupabaseService,
|
|
4960
|
-
addProductSupabaseService
|
|
5012
|
+
addProductSupabaseService,
|
|
5013
|
+
getFunctionalModulesService,
|
|
5014
|
+
addPaymentMethodSupabaseService
|
|
4961
5015
|
];
|
|
4962
5016
|
var usePosService = () => {
|
|
4963
5017
|
const { env } = useEnv();
|
|
@@ -5101,18 +5155,24 @@ var import_react_query128 = require("@tanstack/react-query");
|
|
|
5101
5155
|
// src/hooks/pos/supabase/use-add-product.ts
|
|
5102
5156
|
var import_react_query129 = require("@tanstack/react-query");
|
|
5103
5157
|
|
|
5158
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
5159
|
+
var import_react_query130 = require("@tanstack/react-query");
|
|
5160
|
+
|
|
5161
|
+
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
5162
|
+
var import_react_query131 = require("@tanstack/react-query");
|
|
5163
|
+
|
|
5104
5164
|
// src/provider/service-provider.tsx
|
|
5105
5165
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
5106
|
-
var ServiceContext = (0,
|
|
5166
|
+
var ServiceContext = (0, import_react54.createContext)(null);
|
|
5107
5167
|
|
|
5108
5168
|
// src/provider/meta-provider.tsx
|
|
5109
|
-
var
|
|
5169
|
+
var import_react55 = require("react");
|
|
5110
5170
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
5111
5171
|
|
|
5112
5172
|
// src/services/action-service/index.ts
|
|
5113
5173
|
function useActionService() {
|
|
5114
5174
|
const { env } = useEnv();
|
|
5115
|
-
const loadAction = (0,
|
|
5175
|
+
const loadAction = (0, import_react56.useCallback)(
|
|
5116
5176
|
async ({
|
|
5117
5177
|
idAction,
|
|
5118
5178
|
context,
|
|
@@ -5136,7 +5196,7 @@ function useActionService() {
|
|
|
5136
5196
|
},
|
|
5137
5197
|
[env]
|
|
5138
5198
|
);
|
|
5139
|
-
const callButton = (0,
|
|
5199
|
+
const callButton = (0, import_react56.useCallback)(
|
|
5140
5200
|
async ({
|
|
5141
5201
|
model,
|
|
5142
5202
|
ids = [],
|
|
@@ -5170,7 +5230,7 @@ function useActionService() {
|
|
|
5170
5230
|
},
|
|
5171
5231
|
[env]
|
|
5172
5232
|
);
|
|
5173
|
-
const removeRows = (0,
|
|
5233
|
+
const removeRows = (0, import_react56.useCallback)(
|
|
5174
5234
|
async ({
|
|
5175
5235
|
model,
|
|
5176
5236
|
ids,
|
|
@@ -5196,7 +5256,7 @@ function useActionService() {
|
|
|
5196
5256
|
},
|
|
5197
5257
|
[env]
|
|
5198
5258
|
);
|
|
5199
|
-
const duplicateRecord = (0,
|
|
5259
|
+
const duplicateRecord = (0, import_react56.useCallback)(
|
|
5200
5260
|
async ({
|
|
5201
5261
|
model,
|
|
5202
5262
|
id,
|
|
@@ -5222,7 +5282,7 @@ function useActionService() {
|
|
|
5222
5282
|
},
|
|
5223
5283
|
[env]
|
|
5224
5284
|
);
|
|
5225
|
-
const getPrintReportName = (0,
|
|
5285
|
+
const getPrintReportName = (0, import_react56.useCallback)(
|
|
5226
5286
|
async ({ id }) => {
|
|
5227
5287
|
const jsonData = {
|
|
5228
5288
|
model: "ir.actions.report",
|
|
@@ -5240,7 +5300,7 @@ function useActionService() {
|
|
|
5240
5300
|
},
|
|
5241
5301
|
[env]
|
|
5242
5302
|
);
|
|
5243
|
-
const print = (0,
|
|
5303
|
+
const print = (0, import_react56.useCallback)(
|
|
5244
5304
|
async ({ id, report, db }) => {
|
|
5245
5305
|
const jsonData = {
|
|
5246
5306
|
report,
|
|
@@ -5258,7 +5318,7 @@ function useActionService() {
|
|
|
5258
5318
|
},
|
|
5259
5319
|
[env]
|
|
5260
5320
|
);
|
|
5261
|
-
const runAction = (0,
|
|
5321
|
+
const runAction = (0, import_react56.useCallback)(
|
|
5262
5322
|
async ({
|
|
5263
5323
|
idAction,
|
|
5264
5324
|
context,
|
|
@@ -5285,7 +5345,7 @@ function useActionService() {
|
|
|
5285
5345
|
},
|
|
5286
5346
|
[env]
|
|
5287
5347
|
);
|
|
5288
|
-
const generateSerialNumber = (0,
|
|
5348
|
+
const generateSerialNumber = (0, import_react56.useCallback)(
|
|
5289
5349
|
async ({
|
|
5290
5350
|
kwargs,
|
|
5291
5351
|
context,
|
|
@@ -5323,11 +5383,11 @@ function useActionService() {
|
|
|
5323
5383
|
}
|
|
5324
5384
|
|
|
5325
5385
|
// src/services/auth-service/index.ts
|
|
5326
|
-
var
|
|
5386
|
+
var import_react57 = require("react");
|
|
5327
5387
|
function useAuthService() {
|
|
5328
5388
|
const { env } = useEnv();
|
|
5329
5389
|
const supabase = useSupabaseOptional();
|
|
5330
|
-
const login = (0,
|
|
5390
|
+
const login = (0, import_react57.useCallback)(
|
|
5331
5391
|
async (body) => {
|
|
5332
5392
|
const payload = Object.fromEntries(
|
|
5333
5393
|
Object.entries({
|
|
@@ -5352,7 +5412,7 @@ function useAuthService() {
|
|
|
5352
5412
|
},
|
|
5353
5413
|
[env]
|
|
5354
5414
|
);
|
|
5355
|
-
const loginSupabase = (0,
|
|
5415
|
+
const loginSupabase = (0, import_react57.useCallback)(
|
|
5356
5416
|
async (body) => {
|
|
5357
5417
|
if (!supabase) {
|
|
5358
5418
|
return {
|
|
@@ -5368,7 +5428,7 @@ function useAuthService() {
|
|
|
5368
5428
|
},
|
|
5369
5429
|
[supabase]
|
|
5370
5430
|
);
|
|
5371
|
-
const forgotPassword = (0,
|
|
5431
|
+
const forgotPassword = (0, import_react57.useCallback)(
|
|
5372
5432
|
async (email) => {
|
|
5373
5433
|
const bodyData = {
|
|
5374
5434
|
login: email,
|
|
@@ -5382,7 +5442,7 @@ function useAuthService() {
|
|
|
5382
5442
|
},
|
|
5383
5443
|
[env]
|
|
5384
5444
|
);
|
|
5385
|
-
const forgotPasswordSSO = (0,
|
|
5445
|
+
const forgotPasswordSSO = (0, import_react57.useCallback)(
|
|
5386
5446
|
async ({
|
|
5387
5447
|
email,
|
|
5388
5448
|
with_context,
|
|
@@ -5405,7 +5465,7 @@ function useAuthService() {
|
|
|
5405
5465
|
},
|
|
5406
5466
|
[env]
|
|
5407
5467
|
);
|
|
5408
|
-
const resetPassword = (0,
|
|
5468
|
+
const resetPassword = (0, import_react57.useCallback)(
|
|
5409
5469
|
async (data, token) => {
|
|
5410
5470
|
const bodyData = {
|
|
5411
5471
|
token,
|
|
@@ -5420,7 +5480,7 @@ function useAuthService() {
|
|
|
5420
5480
|
},
|
|
5421
5481
|
[env]
|
|
5422
5482
|
);
|
|
5423
|
-
const resetPasswordSSO = (0,
|
|
5483
|
+
const resetPasswordSSO = (0, import_react57.useCallback)(
|
|
5424
5484
|
async ({
|
|
5425
5485
|
method,
|
|
5426
5486
|
password,
|
|
@@ -5443,7 +5503,7 @@ function useAuthService() {
|
|
|
5443
5503
|
},
|
|
5444
5504
|
[env]
|
|
5445
5505
|
);
|
|
5446
|
-
const updatePassword = (0,
|
|
5506
|
+
const updatePassword = (0, import_react57.useCallback)(
|
|
5447
5507
|
async (data, token) => {
|
|
5448
5508
|
const bodyData = {
|
|
5449
5509
|
token,
|
|
@@ -5458,7 +5518,7 @@ function useAuthService() {
|
|
|
5458
5518
|
},
|
|
5459
5519
|
[env]
|
|
5460
5520
|
);
|
|
5461
|
-
const isValidToken = (0,
|
|
5521
|
+
const isValidToken = (0, import_react57.useCallback)(
|
|
5462
5522
|
async (token) => {
|
|
5463
5523
|
const bodyData = {
|
|
5464
5524
|
token
|
|
@@ -5471,7 +5531,7 @@ function useAuthService() {
|
|
|
5471
5531
|
},
|
|
5472
5532
|
[env]
|
|
5473
5533
|
);
|
|
5474
|
-
const isValidActionToken = (0,
|
|
5534
|
+
const isValidActionToken = (0, import_react57.useCallback)(
|
|
5475
5535
|
async (actionToken) => {
|
|
5476
5536
|
const bodyData = {};
|
|
5477
5537
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -5484,7 +5544,7 @@ function useAuthService() {
|
|
|
5484
5544
|
},
|
|
5485
5545
|
[env]
|
|
5486
5546
|
);
|
|
5487
|
-
const loginSocial = (0,
|
|
5547
|
+
const loginSocial = (0, import_react57.useCallback)(
|
|
5488
5548
|
async ({
|
|
5489
5549
|
db,
|
|
5490
5550
|
state,
|
|
@@ -5502,13 +5562,13 @@ function useAuthService() {
|
|
|
5502
5562
|
},
|
|
5503
5563
|
[env]
|
|
5504
5564
|
);
|
|
5505
|
-
const getProviders = (0,
|
|
5565
|
+
const getProviders = (0, import_react57.useCallback)(
|
|
5506
5566
|
async (db) => {
|
|
5507
5567
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
5508
5568
|
},
|
|
5509
5569
|
[env]
|
|
5510
5570
|
);
|
|
5511
|
-
const getAccessByCode = (0,
|
|
5571
|
+
const getAccessByCode = (0, import_react57.useCallback)(
|
|
5512
5572
|
async (code) => {
|
|
5513
5573
|
const data = new URLSearchParams();
|
|
5514
5574
|
data.append("code", code);
|
|
@@ -5528,7 +5588,7 @@ function useAuthService() {
|
|
|
5528
5588
|
},
|
|
5529
5589
|
[env]
|
|
5530
5590
|
);
|
|
5531
|
-
const logout = (0,
|
|
5591
|
+
const logout = (0, import_react57.useCallback)(
|
|
5532
5592
|
async (service) => {
|
|
5533
5593
|
return env?.requests?.post(
|
|
5534
5594
|
"/logout" /* LOGOUT */,
|
|
@@ -5545,7 +5605,7 @@ function useAuthService() {
|
|
|
5545
5605
|
},
|
|
5546
5606
|
[env]
|
|
5547
5607
|
);
|
|
5548
|
-
const getTenantMapping = (0,
|
|
5608
|
+
const getTenantMapping = (0, import_react57.useCallback)(
|
|
5549
5609
|
async ({ shortName, service }) => {
|
|
5550
5610
|
const bodyData = {
|
|
5551
5611
|
short_name: shortName
|
|
@@ -5563,7 +5623,7 @@ function useAuthService() {
|
|
|
5563
5623
|
},
|
|
5564
5624
|
[env]
|
|
5565
5625
|
);
|
|
5566
|
-
const getToken = (0,
|
|
5626
|
+
const getToken = (0, import_react57.useCallback)(
|
|
5567
5627
|
async ({
|
|
5568
5628
|
phone,
|
|
5569
5629
|
name,
|
|
@@ -5608,10 +5668,10 @@ function useAuthService() {
|
|
|
5608
5668
|
}
|
|
5609
5669
|
|
|
5610
5670
|
// src/services/company-service/index.ts
|
|
5611
|
-
var
|
|
5671
|
+
var import_react58 = require("react");
|
|
5612
5672
|
function useCompanyService() {
|
|
5613
5673
|
const { env } = useEnv();
|
|
5614
|
-
const getCurrentCompany = (0,
|
|
5674
|
+
const getCurrentCompany = (0, import_react58.useCallback)(
|
|
5615
5675
|
async (service, extraHeaders) => {
|
|
5616
5676
|
return await env.requests.get(
|
|
5617
5677
|
"/company" /* COMPANY_PATH */,
|
|
@@ -5628,7 +5688,7 @@ function useCompanyService() {
|
|
|
5628
5688
|
},
|
|
5629
5689
|
[env]
|
|
5630
5690
|
);
|
|
5631
|
-
const getInfoCompany = (0,
|
|
5691
|
+
const getInfoCompany = (0, import_react58.useCallback)(
|
|
5632
5692
|
async (id, service) => {
|
|
5633
5693
|
const jsonData = {
|
|
5634
5694
|
ids: [id],
|
|
@@ -5664,10 +5724,10 @@ function useCompanyService() {
|
|
|
5664
5724
|
}
|
|
5665
5725
|
|
|
5666
5726
|
// src/services/excel-service/index.ts
|
|
5667
|
-
var
|
|
5727
|
+
var import_react59 = require("react");
|
|
5668
5728
|
function useExcelService() {
|
|
5669
5729
|
const { env } = useEnv();
|
|
5670
|
-
const uploadFileExcel = (0,
|
|
5730
|
+
const uploadFileExcel = (0, import_react59.useCallback)(
|
|
5671
5731
|
async ({
|
|
5672
5732
|
formData,
|
|
5673
5733
|
service,
|
|
@@ -5684,7 +5744,7 @@ function useExcelService() {
|
|
|
5684
5744
|
},
|
|
5685
5745
|
[env]
|
|
5686
5746
|
);
|
|
5687
|
-
const uploadIdFile = (0,
|
|
5747
|
+
const uploadIdFile = (0, import_react59.useCallback)(
|
|
5688
5748
|
async ({
|
|
5689
5749
|
formData,
|
|
5690
5750
|
service,
|
|
@@ -5701,7 +5761,7 @@ function useExcelService() {
|
|
|
5701
5761
|
},
|
|
5702
5762
|
[env]
|
|
5703
5763
|
);
|
|
5704
|
-
const parsePreview = (0,
|
|
5764
|
+
const parsePreview = (0, import_react59.useCallback)(
|
|
5705
5765
|
async ({
|
|
5706
5766
|
id,
|
|
5707
5767
|
selectedSheet,
|
|
@@ -5750,7 +5810,7 @@ function useExcelService() {
|
|
|
5750
5810
|
},
|
|
5751
5811
|
[env]
|
|
5752
5812
|
);
|
|
5753
|
-
const executeImport = (0,
|
|
5813
|
+
const executeImport = (0, import_react59.useCallback)(
|
|
5754
5814
|
async ({
|
|
5755
5815
|
columns,
|
|
5756
5816
|
fields,
|
|
@@ -5784,7 +5844,7 @@ function useExcelService() {
|
|
|
5784
5844
|
},
|
|
5785
5845
|
[env]
|
|
5786
5846
|
);
|
|
5787
|
-
const getFileExcel = (0,
|
|
5847
|
+
const getFileExcel = (0, import_react59.useCallback)(
|
|
5788
5848
|
async ({
|
|
5789
5849
|
model,
|
|
5790
5850
|
service,
|
|
@@ -5808,7 +5868,7 @@ function useExcelService() {
|
|
|
5808
5868
|
},
|
|
5809
5869
|
[env]
|
|
5810
5870
|
);
|
|
5811
|
-
const getFieldExport = (0,
|
|
5871
|
+
const getFieldExport = (0, import_react59.useCallback)(
|
|
5812
5872
|
async ({
|
|
5813
5873
|
ids,
|
|
5814
5874
|
model,
|
|
@@ -5848,7 +5908,7 @@ function useExcelService() {
|
|
|
5848
5908
|
},
|
|
5849
5909
|
[env]
|
|
5850
5910
|
);
|
|
5851
|
-
const exportExcel = (0,
|
|
5911
|
+
const exportExcel = (0, import_react59.useCallback)(
|
|
5852
5912
|
async ({
|
|
5853
5913
|
model,
|
|
5854
5914
|
domain,
|
|
@@ -5896,10 +5956,10 @@ function useExcelService() {
|
|
|
5896
5956
|
}
|
|
5897
5957
|
|
|
5898
5958
|
// src/services/form-service/index.ts
|
|
5899
|
-
var
|
|
5959
|
+
var import_react60 = require("react");
|
|
5900
5960
|
function useFormService() {
|
|
5901
5961
|
const { env } = useEnv();
|
|
5902
|
-
const getComment = (0,
|
|
5962
|
+
const getComment = (0, import_react60.useCallback)(
|
|
5903
5963
|
async ({ data }) => {
|
|
5904
5964
|
const jsonData = {
|
|
5905
5965
|
thread_id: data.thread_id,
|
|
@@ -5917,7 +5977,7 @@ function useFormService() {
|
|
|
5917
5977
|
},
|
|
5918
5978
|
[env]
|
|
5919
5979
|
);
|
|
5920
|
-
const getThreadData = (0,
|
|
5980
|
+
const getThreadData = (0, import_react60.useCallback)(
|
|
5921
5981
|
async ({
|
|
5922
5982
|
data,
|
|
5923
5983
|
xNode,
|
|
@@ -5944,7 +6004,7 @@ function useFormService() {
|
|
|
5944
6004
|
},
|
|
5945
6005
|
[env]
|
|
5946
6006
|
);
|
|
5947
|
-
const getThreadMessages = (0,
|
|
6007
|
+
const getThreadMessages = (0, import_react60.useCallback)(
|
|
5948
6008
|
async ({
|
|
5949
6009
|
data,
|
|
5950
6010
|
xNode,
|
|
@@ -5970,7 +6030,7 @@ function useFormService() {
|
|
|
5970
6030
|
},
|
|
5971
6031
|
[env]
|
|
5972
6032
|
);
|
|
5973
|
-
const sentComment = (0,
|
|
6033
|
+
const sentComment = (0, import_react60.useCallback)(
|
|
5974
6034
|
async ({ data }) => {
|
|
5975
6035
|
const jsonData = {
|
|
5976
6036
|
context: {
|
|
@@ -5998,7 +6058,7 @@ function useFormService() {
|
|
|
5998
6058
|
},
|
|
5999
6059
|
[env]
|
|
6000
6060
|
);
|
|
6001
|
-
const deleteComment = (0,
|
|
6061
|
+
const deleteComment = (0, import_react60.useCallback)(
|
|
6002
6062
|
async ({ data }) => {
|
|
6003
6063
|
const jsonData = {
|
|
6004
6064
|
attachment_ids: [],
|
|
@@ -6014,7 +6074,7 @@ function useFormService() {
|
|
|
6014
6074
|
},
|
|
6015
6075
|
[env]
|
|
6016
6076
|
);
|
|
6017
|
-
const getImage = (0,
|
|
6077
|
+
const getImage = (0, import_react60.useCallback)(
|
|
6018
6078
|
async ({ data }) => {
|
|
6019
6079
|
return env.requests.get(
|
|
6020
6080
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6027,7 +6087,7 @@ function useFormService() {
|
|
|
6027
6087
|
},
|
|
6028
6088
|
[env]
|
|
6029
6089
|
);
|
|
6030
|
-
const uploadImage = (0,
|
|
6090
|
+
const uploadImage = (0, import_react60.useCallback)(
|
|
6031
6091
|
async ({
|
|
6032
6092
|
formData,
|
|
6033
6093
|
service,
|
|
@@ -6046,7 +6106,7 @@ function useFormService() {
|
|
|
6046
6106
|
},
|
|
6047
6107
|
[env]
|
|
6048
6108
|
);
|
|
6049
|
-
const uploadFile = (0,
|
|
6109
|
+
const uploadFile = (0, import_react60.useCallback)(
|
|
6050
6110
|
async ({
|
|
6051
6111
|
formData,
|
|
6052
6112
|
service,
|
|
@@ -6066,7 +6126,7 @@ function useFormService() {
|
|
|
6066
6126
|
},
|
|
6067
6127
|
[env]
|
|
6068
6128
|
);
|
|
6069
|
-
const getFormView = (0,
|
|
6129
|
+
const getFormView = (0, import_react60.useCallback)(
|
|
6070
6130
|
async ({ data }) => {
|
|
6071
6131
|
const jsonData = {
|
|
6072
6132
|
model: data.model,
|
|
@@ -6082,7 +6142,7 @@ function useFormService() {
|
|
|
6082
6142
|
},
|
|
6083
6143
|
[env]
|
|
6084
6144
|
);
|
|
6085
|
-
const changeStatus = (0,
|
|
6145
|
+
const changeStatus = (0, import_react60.useCallback)(
|
|
6086
6146
|
async ({ data }) => {
|
|
6087
6147
|
const vals = {
|
|
6088
6148
|
[data.name]: data.stage_id
|
|
@@ -6111,7 +6171,7 @@ function useFormService() {
|
|
|
6111
6171
|
},
|
|
6112
6172
|
[env]
|
|
6113
6173
|
);
|
|
6114
|
-
const getExternalTab = (0,
|
|
6174
|
+
const getExternalTab = (0, import_react60.useCallback)(
|
|
6115
6175
|
async ({ method, context, service, xNode }) => {
|
|
6116
6176
|
return env?.requests?.post(
|
|
6117
6177
|
"/call" /* CALL_PATH */,
|
|
@@ -6146,10 +6206,10 @@ function useFormService() {
|
|
|
6146
6206
|
}
|
|
6147
6207
|
|
|
6148
6208
|
// src/services/kanban-service/index.ts
|
|
6149
|
-
var
|
|
6209
|
+
var import_react61 = require("react");
|
|
6150
6210
|
function useKanbanService() {
|
|
6151
6211
|
const { env } = useEnv();
|
|
6152
|
-
const getGroups = (0,
|
|
6212
|
+
const getGroups = (0, import_react61.useCallback)(
|
|
6153
6213
|
async ({ model, width_context }) => {
|
|
6154
6214
|
const jsonData = {
|
|
6155
6215
|
model,
|
|
@@ -6169,7 +6229,7 @@ function useKanbanService() {
|
|
|
6169
6229
|
},
|
|
6170
6230
|
[env]
|
|
6171
6231
|
);
|
|
6172
|
-
const getProgressBar = (0,
|
|
6232
|
+
const getProgressBar = (0, import_react61.useCallback)(
|
|
6173
6233
|
async ({ field, color, model, width_context }) => {
|
|
6174
6234
|
const jsonData = {
|
|
6175
6235
|
model,
|
|
@@ -6199,10 +6259,10 @@ function useKanbanService() {
|
|
|
6199
6259
|
}
|
|
6200
6260
|
|
|
6201
6261
|
// src/services/model-service/index.ts
|
|
6202
|
-
var
|
|
6262
|
+
var import_react62 = require("react");
|
|
6203
6263
|
function useModelService() {
|
|
6204
6264
|
const { env } = useEnv();
|
|
6205
|
-
const getListMyBankAccount = (0,
|
|
6265
|
+
const getListMyBankAccount = (0, import_react62.useCallback)(
|
|
6206
6266
|
async ({
|
|
6207
6267
|
domain,
|
|
6208
6268
|
spectification,
|
|
@@ -6226,7 +6286,7 @@ function useModelService() {
|
|
|
6226
6286
|
},
|
|
6227
6287
|
[env]
|
|
6228
6288
|
);
|
|
6229
|
-
const getCurrency = (0,
|
|
6289
|
+
const getCurrency = (0, import_react62.useCallback)(async () => {
|
|
6230
6290
|
const jsonData = {
|
|
6231
6291
|
model: "res.currency",
|
|
6232
6292
|
method: "web_search_read",
|
|
@@ -6246,7 +6306,7 @@ function useModelService() {
|
|
|
6246
6306
|
}
|
|
6247
6307
|
});
|
|
6248
6308
|
}, [env]);
|
|
6249
|
-
const getConversionRate = (0,
|
|
6309
|
+
const getConversionRate = (0, import_react62.useCallback)(async () => {
|
|
6250
6310
|
const jsonData = {
|
|
6251
6311
|
model: "res.currency",
|
|
6252
6312
|
method: "web_search_read",
|
|
@@ -6272,7 +6332,7 @@ function useModelService() {
|
|
|
6272
6332
|
}
|
|
6273
6333
|
});
|
|
6274
6334
|
}, [env]);
|
|
6275
|
-
const getAll = (0,
|
|
6335
|
+
const getAll = (0, import_react62.useCallback)(
|
|
6276
6336
|
async ({
|
|
6277
6337
|
data,
|
|
6278
6338
|
service,
|
|
@@ -6314,7 +6374,7 @@ function useModelService() {
|
|
|
6314
6374
|
},
|
|
6315
6375
|
[env]
|
|
6316
6376
|
);
|
|
6317
|
-
const getListCalendar = (0,
|
|
6377
|
+
const getListCalendar = (0, import_react62.useCallback)(
|
|
6318
6378
|
async ({ data }) => {
|
|
6319
6379
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6320
6380
|
fields: data.fields,
|
|
@@ -6345,7 +6405,7 @@ function useModelService() {
|
|
|
6345
6405
|
},
|
|
6346
6406
|
[env]
|
|
6347
6407
|
);
|
|
6348
|
-
const getList = (0,
|
|
6408
|
+
const getList = (0, import_react62.useCallback)(
|
|
6349
6409
|
async ({
|
|
6350
6410
|
model,
|
|
6351
6411
|
ids = [],
|
|
@@ -6377,7 +6437,7 @@ function useModelService() {
|
|
|
6377
6437
|
},
|
|
6378
6438
|
[env]
|
|
6379
6439
|
);
|
|
6380
|
-
const getDetail = (0,
|
|
6440
|
+
const getDetail = (0, import_react62.useCallback)(
|
|
6381
6441
|
async ({
|
|
6382
6442
|
ids = [],
|
|
6383
6443
|
model,
|
|
@@ -6409,7 +6469,7 @@ function useModelService() {
|
|
|
6409
6469
|
},
|
|
6410
6470
|
[env]
|
|
6411
6471
|
);
|
|
6412
|
-
const save = (0,
|
|
6472
|
+
const save = (0, import_react62.useCallback)(
|
|
6413
6473
|
async ({
|
|
6414
6474
|
model,
|
|
6415
6475
|
ids = [],
|
|
@@ -6444,7 +6504,7 @@ function useModelService() {
|
|
|
6444
6504
|
},
|
|
6445
6505
|
[env]
|
|
6446
6506
|
);
|
|
6447
|
-
const deleteApi = (0,
|
|
6507
|
+
const deleteApi = (0, import_react62.useCallback)(
|
|
6448
6508
|
async ({ ids = [], model, service }) => {
|
|
6449
6509
|
const jsonData = {
|
|
6450
6510
|
model,
|
|
@@ -6464,7 +6524,7 @@ function useModelService() {
|
|
|
6464
6524
|
},
|
|
6465
6525
|
[env]
|
|
6466
6526
|
);
|
|
6467
|
-
const onChange = (0,
|
|
6527
|
+
const onChange = (0, import_react62.useCallback)(
|
|
6468
6528
|
async ({
|
|
6469
6529
|
ids = [],
|
|
6470
6530
|
model,
|
|
@@ -6500,7 +6560,7 @@ function useModelService() {
|
|
|
6500
6560
|
},
|
|
6501
6561
|
[env]
|
|
6502
6562
|
);
|
|
6503
|
-
const getListFieldsOnchange = (0,
|
|
6563
|
+
const getListFieldsOnchange = (0, import_react62.useCallback)(
|
|
6504
6564
|
async ({
|
|
6505
6565
|
model,
|
|
6506
6566
|
service,
|
|
@@ -6524,7 +6584,7 @@ function useModelService() {
|
|
|
6524
6584
|
},
|
|
6525
6585
|
[env]
|
|
6526
6586
|
);
|
|
6527
|
-
const parseORMOdoo = (0,
|
|
6587
|
+
const parseORMOdoo = (0, import_react62.useCallback)((data) => {
|
|
6528
6588
|
for (const key in data) {
|
|
6529
6589
|
if (key === "display_name") {
|
|
6530
6590
|
delete data[key];
|
|
@@ -6535,7 +6595,7 @@ function useModelService() {
|
|
|
6535
6595
|
}
|
|
6536
6596
|
return { ...data };
|
|
6537
6597
|
}, []);
|
|
6538
|
-
const toDataJS = (0,
|
|
6598
|
+
const toDataJS = (0, import_react62.useCallback)(
|
|
6539
6599
|
(data, viewData, model) => {
|
|
6540
6600
|
for (const key in data) {
|
|
6541
6601
|
if (data[key] === false) {
|
|
@@ -6593,10 +6653,10 @@ function useModelService() {
|
|
|
6593
6653
|
}
|
|
6594
6654
|
|
|
6595
6655
|
// src/services/user-service/index.ts
|
|
6596
|
-
var
|
|
6656
|
+
var import_react63 = require("react");
|
|
6597
6657
|
function useUserService() {
|
|
6598
6658
|
const { env } = useEnv();
|
|
6599
|
-
const getProfile = (0,
|
|
6659
|
+
const getProfile = (0, import_react63.useCallback)(
|
|
6600
6660
|
async (service, path, extraHeaders) => {
|
|
6601
6661
|
return env?.requests?.get(
|
|
6602
6662
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -6613,7 +6673,7 @@ function useUserService() {
|
|
|
6613
6673
|
},
|
|
6614
6674
|
[env]
|
|
6615
6675
|
);
|
|
6616
|
-
const getUser = (0,
|
|
6676
|
+
const getUser = (0, import_react63.useCallback)(
|
|
6617
6677
|
async ({ context, id }) => {
|
|
6618
6678
|
const jsonData = {
|
|
6619
6679
|
model: "res.users",
|
|
@@ -6651,7 +6711,7 @@ function useUserService() {
|
|
|
6651
6711
|
},
|
|
6652
6712
|
[env]
|
|
6653
6713
|
);
|
|
6654
|
-
const switchUserLocale = (0,
|
|
6714
|
+
const switchUserLocale = (0, import_react63.useCallback)(
|
|
6655
6715
|
async ({ id, values, service }) => {
|
|
6656
6716
|
const jsonData = {
|
|
6657
6717
|
model: "res.users",
|
|
@@ -6679,10 +6739,10 @@ function useUserService() {
|
|
|
6679
6739
|
}
|
|
6680
6740
|
|
|
6681
6741
|
// src/services/view-service/index.ts
|
|
6682
|
-
var
|
|
6742
|
+
var import_react64 = require("react");
|
|
6683
6743
|
function useViewService() {
|
|
6684
6744
|
const { env } = useEnv();
|
|
6685
|
-
const getView = (0,
|
|
6745
|
+
const getView = (0, import_react64.useCallback)(
|
|
6686
6746
|
async ({
|
|
6687
6747
|
model,
|
|
6688
6748
|
views,
|
|
@@ -6722,7 +6782,7 @@ function useViewService() {
|
|
|
6722
6782
|
},
|
|
6723
6783
|
[env]
|
|
6724
6784
|
);
|
|
6725
|
-
const getMenu = (0,
|
|
6785
|
+
const getMenu = (0, import_react64.useCallback)(
|
|
6726
6786
|
async (context, specification, domain, service) => {
|
|
6727
6787
|
const jsonData = {
|
|
6728
6788
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -6753,7 +6813,7 @@ function useViewService() {
|
|
|
6753
6813
|
},
|
|
6754
6814
|
[env]
|
|
6755
6815
|
);
|
|
6756
|
-
const getActionDetail = (0,
|
|
6816
|
+
const getActionDetail = (0, import_react64.useCallback)(
|
|
6757
6817
|
async (aid, context) => {
|
|
6758
6818
|
const jsonData = {
|
|
6759
6819
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -6783,7 +6843,7 @@ function useViewService() {
|
|
|
6783
6843
|
},
|
|
6784
6844
|
[env]
|
|
6785
6845
|
);
|
|
6786
|
-
const getResequence = (0,
|
|
6846
|
+
const getResequence = (0, import_react64.useCallback)(
|
|
6787
6847
|
async ({
|
|
6788
6848
|
model,
|
|
6789
6849
|
ids,
|
|
@@ -6813,7 +6873,7 @@ function useViewService() {
|
|
|
6813
6873
|
},
|
|
6814
6874
|
[env]
|
|
6815
6875
|
);
|
|
6816
|
-
const getSelectionItem = (0,
|
|
6876
|
+
const getSelectionItem = (0, import_react64.useCallback)(
|
|
6817
6877
|
async ({
|
|
6818
6878
|
data,
|
|
6819
6879
|
service,
|
|
@@ -6850,7 +6910,7 @@ function useViewService() {
|
|
|
6850
6910
|
},
|
|
6851
6911
|
[env]
|
|
6852
6912
|
);
|
|
6853
|
-
const loadMessages = (0,
|
|
6913
|
+
const loadMessages = (0, import_react64.useCallback)(async () => {
|
|
6854
6914
|
return env.requests.post(
|
|
6855
6915
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
6856
6916
|
{},
|
|
@@ -6861,14 +6921,14 @@ function useViewService() {
|
|
|
6861
6921
|
}
|
|
6862
6922
|
);
|
|
6863
6923
|
}, [env]);
|
|
6864
|
-
const getVersion = (0,
|
|
6924
|
+
const getVersion = (0, import_react64.useCallback)(async () => {
|
|
6865
6925
|
return env?.requests?.get("", {
|
|
6866
6926
|
headers: {
|
|
6867
6927
|
"Content-Type": "application/json"
|
|
6868
6928
|
}
|
|
6869
6929
|
});
|
|
6870
6930
|
}, [env]);
|
|
6871
|
-
const grantAccess = (0,
|
|
6931
|
+
const grantAccess = (0, import_react64.useCallback)(
|
|
6872
6932
|
async ({
|
|
6873
6933
|
redirect_uri,
|
|
6874
6934
|
state,
|
|
@@ -6895,7 +6955,7 @@ function useViewService() {
|
|
|
6895
6955
|
},
|
|
6896
6956
|
[env]
|
|
6897
6957
|
);
|
|
6898
|
-
const removeTotpSetUp = (0,
|
|
6958
|
+
const removeTotpSetUp = (0, import_react64.useCallback)(
|
|
6899
6959
|
async ({ method, token }) => {
|
|
6900
6960
|
const jsonData = {
|
|
6901
6961
|
method,
|
|
@@ -6916,7 +6976,7 @@ function useViewService() {
|
|
|
6916
6976
|
},
|
|
6917
6977
|
[env]
|
|
6918
6978
|
);
|
|
6919
|
-
const requestSetupTotp = (0,
|
|
6979
|
+
const requestSetupTotp = (0, import_react64.useCallback)(
|
|
6920
6980
|
async ({ method, token }) => {
|
|
6921
6981
|
const jsonData = {
|
|
6922
6982
|
method,
|
|
@@ -6935,7 +6995,7 @@ function useViewService() {
|
|
|
6935
6995
|
},
|
|
6936
6996
|
[env]
|
|
6937
6997
|
);
|
|
6938
|
-
const settingsWebRead2fa = (0,
|
|
6998
|
+
const settingsWebRead2fa = (0, import_react64.useCallback)(
|
|
6939
6999
|
async ({
|
|
6940
7000
|
method,
|
|
6941
7001
|
model,
|
|
@@ -6963,7 +7023,7 @@ function useViewService() {
|
|
|
6963
7023
|
},
|
|
6964
7024
|
[env]
|
|
6965
7025
|
);
|
|
6966
|
-
const signInSSO = (0,
|
|
7026
|
+
const signInSSO = (0, import_react64.useCallback)(
|
|
6967
7027
|
async ({
|
|
6968
7028
|
redirect_uri,
|
|
6969
7029
|
state,
|
|
@@ -6995,7 +7055,7 @@ function useViewService() {
|
|
|
6995
7055
|
},
|
|
6996
7056
|
[env]
|
|
6997
7057
|
);
|
|
6998
|
-
const verify2FA = (0,
|
|
7058
|
+
const verify2FA = (0, import_react64.useCallback)(
|
|
6999
7059
|
({
|
|
7000
7060
|
method,
|
|
7001
7061
|
with_context,
|
|
@@ -7028,7 +7088,7 @@ function useViewService() {
|
|
|
7028
7088
|
},
|
|
7029
7089
|
[env]
|
|
7030
7090
|
);
|
|
7031
|
-
const get2FAMethods = (0,
|
|
7091
|
+
const get2FAMethods = (0, import_react64.useCallback)(
|
|
7032
7092
|
({ method, with_context }) => {
|
|
7033
7093
|
const jsonData = {
|
|
7034
7094
|
method,
|
|
@@ -7047,7 +7107,7 @@ function useViewService() {
|
|
|
7047
7107
|
},
|
|
7048
7108
|
[env]
|
|
7049
7109
|
);
|
|
7050
|
-
const verifyTotp = (0,
|
|
7110
|
+
const verifyTotp = (0, import_react64.useCallback)(
|
|
7051
7111
|
({
|
|
7052
7112
|
method,
|
|
7053
7113
|
action_token,
|
|
@@ -7072,7 +7132,7 @@ function useViewService() {
|
|
|
7072
7132
|
},
|
|
7073
7133
|
[env]
|
|
7074
7134
|
);
|
|
7075
|
-
const getNotifications = (0,
|
|
7135
|
+
const getNotifications = (0, import_react64.useCallback)(
|
|
7076
7136
|
async ({
|
|
7077
7137
|
service,
|
|
7078
7138
|
xNode,
|
|
@@ -7092,7 +7152,7 @@ function useViewService() {
|
|
|
7092
7152
|
},
|
|
7093
7153
|
[env]
|
|
7094
7154
|
);
|
|
7095
|
-
const getCountry = (0,
|
|
7155
|
+
const getCountry = (0, import_react64.useCallback)(
|
|
7096
7156
|
async ({
|
|
7097
7157
|
service,
|
|
7098
7158
|
xNode,
|
|
@@ -7119,7 +7179,7 @@ function useViewService() {
|
|
|
7119
7179
|
},
|
|
7120
7180
|
[env]
|
|
7121
7181
|
);
|
|
7122
|
-
const getCity = (0,
|
|
7182
|
+
const getCity = (0, import_react64.useCallback)(
|
|
7123
7183
|
async ({
|
|
7124
7184
|
service,
|
|
7125
7185
|
xNode,
|
|
@@ -7146,7 +7206,7 @@ function useViewService() {
|
|
|
7146
7206
|
},
|
|
7147
7207
|
[env]
|
|
7148
7208
|
);
|
|
7149
|
-
const getWard = (0,
|
|
7209
|
+
const getWard = (0, import_react64.useCallback)(
|
|
7150
7210
|
async ({
|
|
7151
7211
|
service,
|
|
7152
7212
|
xNode,
|
|
@@ -7171,7 +7231,7 @@ function useViewService() {
|
|
|
7171
7231
|
},
|
|
7172
7232
|
[env]
|
|
7173
7233
|
);
|
|
7174
|
-
const getPartnerTitle = (0,
|
|
7234
|
+
const getPartnerTitle = (0, import_react64.useCallback)(
|
|
7175
7235
|
async ({
|
|
7176
7236
|
service,
|
|
7177
7237
|
xNode,
|
|
@@ -7223,10 +7283,10 @@ function useViewService() {
|
|
|
7223
7283
|
}
|
|
7224
7284
|
|
|
7225
7285
|
// src/services/dashboard-service/index.ts
|
|
7226
|
-
var
|
|
7286
|
+
var import_react65 = require("react");
|
|
7227
7287
|
function useDashboardService() {
|
|
7228
7288
|
const { env } = useEnv();
|
|
7229
|
-
const readGroup = (0,
|
|
7289
|
+
const readGroup = (0, import_react65.useCallback)(
|
|
7230
7290
|
async ({
|
|
7231
7291
|
service,
|
|
7232
7292
|
xNode,
|
|
@@ -7243,7 +7303,7 @@ function useDashboardService() {
|
|
|
7243
7303
|
},
|
|
7244
7304
|
[env]
|
|
7245
7305
|
);
|
|
7246
|
-
const getDataChart = (0,
|
|
7306
|
+
const getDataChart = (0, import_react65.useCallback)(
|
|
7247
7307
|
async ({
|
|
7248
7308
|
service,
|
|
7249
7309
|
xNode,
|