@fctc/interface-logic 5.0.7 → 5.0.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/constants.d.mts +6 -2
- package/dist/constants.d.ts +6 -2
- package/dist/constants.js +4 -0
- package/dist/constants.mjs +4 -0
- package/dist/hooks.d.mts +30 -1
- package/dist/hooks.d.ts +30 -1
- package/dist/hooks.js +315 -130
- package/dist/hooks.mjs +311 -130
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +322 -130
- package/dist/index.mjs +318 -130
- package/dist/provider.d.mts +5 -1
- package/dist/provider.d.ts +5 -1
- package/dist/provider.js +332 -151
- package/dist/provider.mjs +321 -140
- package/dist/services.d.mts +29 -0
- package/dist/services.d.ts +29 -0
- package/dist/services.js +343 -194
- package/dist/services.mjs +340 -191
- 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 useCallback71 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -49,6 +49,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
49
49
|
UriConstants2["PUBLIC_USER_INFO"] = "/public/user/info";
|
|
50
50
|
UriConstants2["FUNCTIONAL_MODULES"] = "/functional-modules";
|
|
51
51
|
UriConstants2["ACTION_SERVER_HOME"] = "/action_server_home";
|
|
52
|
+
UriConstants2["APP_AUTHENTICATE"] = "/app/authenticate";
|
|
52
53
|
return UriConstants2;
|
|
53
54
|
})(UriConstants || {});
|
|
54
55
|
|
|
@@ -4409,11 +4410,143 @@ var getFunctionalModulesService = (env) => {
|
|
|
4409
4410
|
};
|
|
4410
4411
|
};
|
|
4411
4412
|
|
|
4412
|
-
// src/services/pos-service/
|
|
4413
|
+
// src/services/pos-service/app-authenticate.ts
|
|
4413
4414
|
import { useCallback as useCallback34 } from "react";
|
|
4415
|
+
var appAuthenticateService = (env) => {
|
|
4416
|
+
const appAuthenticate = useCallback34(
|
|
4417
|
+
({
|
|
4418
|
+
xNode,
|
|
4419
|
+
service,
|
|
4420
|
+
appKey,
|
|
4421
|
+
activationCode,
|
|
4422
|
+
clientId,
|
|
4423
|
+
clientSecret
|
|
4424
|
+
}) => {
|
|
4425
|
+
const jsonData = {
|
|
4426
|
+
app_key: appKey,
|
|
4427
|
+
activation_code: activationCode,
|
|
4428
|
+
client_id: clientId,
|
|
4429
|
+
client_secret: clientSecret
|
|
4430
|
+
};
|
|
4431
|
+
return env?.requests.post(
|
|
4432
|
+
"/app/authenticate" /* APP_AUTHENTICATE */,
|
|
4433
|
+
jsonData,
|
|
4434
|
+
{
|
|
4435
|
+
headers: {
|
|
4436
|
+
"Content-Type": "application/json",
|
|
4437
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4438
|
+
}
|
|
4439
|
+
},
|
|
4440
|
+
service
|
|
4441
|
+
);
|
|
4442
|
+
},
|
|
4443
|
+
[env]
|
|
4444
|
+
);
|
|
4445
|
+
return {
|
|
4446
|
+
appAuthenticate
|
|
4447
|
+
};
|
|
4448
|
+
};
|
|
4449
|
+
|
|
4450
|
+
// src/services/pos-service/apply-voucher.ts
|
|
4451
|
+
import { useCallback as useCallback35 } from "react";
|
|
4452
|
+
var applyVoucherService = (env) => {
|
|
4453
|
+
const applyVoucher = useCallback35(
|
|
4454
|
+
({ xNode, service, ids, voucherCode }) => {
|
|
4455
|
+
const jsonData = {
|
|
4456
|
+
model: "pos.order" /* POS_ORDER */,
|
|
4457
|
+
method: "action_apply_voucher" /* ACTION_APPLY_VOUCHER */,
|
|
4458
|
+
ids,
|
|
4459
|
+
kwargs: {
|
|
4460
|
+
voucher_code: voucherCode
|
|
4461
|
+
}
|
|
4462
|
+
};
|
|
4463
|
+
return env?.requests.post(
|
|
4464
|
+
"/call" /* CALL_PATH */,
|
|
4465
|
+
jsonData,
|
|
4466
|
+
{
|
|
4467
|
+
headers: {
|
|
4468
|
+
"Content-Type": "application/json",
|
|
4469
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4470
|
+
}
|
|
4471
|
+
},
|
|
4472
|
+
service
|
|
4473
|
+
);
|
|
4474
|
+
},
|
|
4475
|
+
[env]
|
|
4476
|
+
);
|
|
4477
|
+
return {
|
|
4478
|
+
applyVoucher
|
|
4479
|
+
};
|
|
4480
|
+
};
|
|
4481
|
+
|
|
4482
|
+
// src/services/pos-service/remove-voucher.ts
|
|
4483
|
+
import { useCallback as useCallback36 } from "react";
|
|
4484
|
+
var removeVoucherService = (env) => {
|
|
4485
|
+
const removeVoucher = useCallback36(
|
|
4486
|
+
({ xNode, service, ids, programId }) => {
|
|
4487
|
+
const jsonData = {
|
|
4488
|
+
model: "pos.order" /* POS_ORDER */,
|
|
4489
|
+
method: "action_remove_voucher" /* ACTION_REMOVE_VOUCHER */,
|
|
4490
|
+
ids,
|
|
4491
|
+
kwargs: {
|
|
4492
|
+
program_id: programId
|
|
4493
|
+
}
|
|
4494
|
+
};
|
|
4495
|
+
return env?.requests.post(
|
|
4496
|
+
"/call" /* CALL_PATH */,
|
|
4497
|
+
jsonData,
|
|
4498
|
+
{
|
|
4499
|
+
headers: {
|
|
4500
|
+
"Content-Type": "application/json",
|
|
4501
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4502
|
+
}
|
|
4503
|
+
},
|
|
4504
|
+
service
|
|
4505
|
+
);
|
|
4506
|
+
},
|
|
4507
|
+
[env]
|
|
4508
|
+
);
|
|
4509
|
+
return {
|
|
4510
|
+
removeVoucher
|
|
4511
|
+
};
|
|
4512
|
+
};
|
|
4513
|
+
|
|
4514
|
+
// src/services/pos-service/sync-from-ui.ts
|
|
4515
|
+
import { useCallback as useCallback37 } from "react";
|
|
4516
|
+
var syncFromUiService = (env) => {
|
|
4517
|
+
const syncFromUi = useCallback37(
|
|
4518
|
+
({ xNode, service, orders }) => {
|
|
4519
|
+
const jsonData = {
|
|
4520
|
+
method: "sync_from_ui" /* SYNC_FROM_UI */,
|
|
4521
|
+
model: "pos.order" /* POS_ORDER */,
|
|
4522
|
+
kwargs: {
|
|
4523
|
+
orders
|
|
4524
|
+
}
|
|
4525
|
+
};
|
|
4526
|
+
return env?.requests.post(
|
|
4527
|
+
"/call" /* CALL_PATH */,
|
|
4528
|
+
jsonData,
|
|
4529
|
+
{
|
|
4530
|
+
headers: {
|
|
4531
|
+
"Content-Type": "application/json",
|
|
4532
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4533
|
+
}
|
|
4534
|
+
},
|
|
4535
|
+
service
|
|
4536
|
+
);
|
|
4537
|
+
},
|
|
4538
|
+
[env]
|
|
4539
|
+
);
|
|
4540
|
+
return {
|
|
4541
|
+
syncFromUi
|
|
4542
|
+
};
|
|
4543
|
+
};
|
|
4544
|
+
|
|
4545
|
+
// src/services/pos-service/supabase/add-floor.ts
|
|
4546
|
+
import { useCallback as useCallback38 } from "react";
|
|
4414
4547
|
var addFloorSupabaseService = () => {
|
|
4415
4548
|
const supabase = useSupabaseOptional();
|
|
4416
|
-
const addFloorSupabase =
|
|
4549
|
+
const addFloorSupabase = useCallback38(
|
|
4417
4550
|
async (values) => {
|
|
4418
4551
|
if (!supabase) {
|
|
4419
4552
|
console.error("Supabase client not initialized");
|
|
@@ -4444,10 +4577,10 @@ var addFloorSupabaseService = () => {
|
|
|
4444
4577
|
};
|
|
4445
4578
|
|
|
4446
4579
|
// src/services/pos-service/supabase/add-table.ts
|
|
4447
|
-
import { useCallback as
|
|
4580
|
+
import { useCallback as useCallback39 } from "react";
|
|
4448
4581
|
var addTableSupabaseService = () => {
|
|
4449
4582
|
const supabase = useSupabaseOptional();
|
|
4450
|
-
const addTableSupabase =
|
|
4583
|
+
const addTableSupabase = useCallback39(
|
|
4451
4584
|
async (values) => {
|
|
4452
4585
|
if (!supabase) {
|
|
4453
4586
|
console.error("Supabase client not initialized");
|
|
@@ -4477,10 +4610,10 @@ var addTableSupabaseService = () => {
|
|
|
4477
4610
|
};
|
|
4478
4611
|
|
|
4479
4612
|
// src/services/pos-service/supabase/update-floor.ts
|
|
4480
|
-
import { useCallback as
|
|
4613
|
+
import { useCallback as useCallback40 } from "react";
|
|
4481
4614
|
var updateFloorSupabaseService = () => {
|
|
4482
4615
|
const supabase = useSupabaseOptional();
|
|
4483
|
-
const updateFloorSupabase =
|
|
4616
|
+
const updateFloorSupabase = useCallback40(
|
|
4484
4617
|
async (values) => {
|
|
4485
4618
|
if (!supabase) {
|
|
4486
4619
|
console.error("Supabase client not initialized");
|
|
@@ -4507,10 +4640,10 @@ var updateFloorSupabaseService = () => {
|
|
|
4507
4640
|
};
|
|
4508
4641
|
|
|
4509
4642
|
// src/services/pos-service/supabase/update-table.ts
|
|
4510
|
-
import { useCallback as
|
|
4643
|
+
import { useCallback as useCallback41 } from "react";
|
|
4511
4644
|
var updateTableSupabaseService = () => {
|
|
4512
4645
|
const supabase = useSupabaseOptional();
|
|
4513
|
-
const updateTableSupabase =
|
|
4646
|
+
const updateTableSupabase = useCallback41(
|
|
4514
4647
|
async (values) => {
|
|
4515
4648
|
if (!supabase) {
|
|
4516
4649
|
console.error("Supabase client not initialized");
|
|
@@ -4537,10 +4670,10 @@ var updateTableSupabaseService = () => {
|
|
|
4537
4670
|
};
|
|
4538
4671
|
|
|
4539
4672
|
// src/services/pos-service/supabase/delete-floor.ts
|
|
4540
|
-
import { useCallback as
|
|
4673
|
+
import { useCallback as useCallback42 } from "react";
|
|
4541
4674
|
var deleteFloorSupabaseService = () => {
|
|
4542
4675
|
const supabase = useSupabaseOptional();
|
|
4543
|
-
const deleteFloorSupabase =
|
|
4676
|
+
const deleteFloorSupabase = useCallback42(
|
|
4544
4677
|
async (values) => {
|
|
4545
4678
|
if (!supabase) {
|
|
4546
4679
|
console.error("Supabase client not initialized");
|
|
@@ -4566,10 +4699,10 @@ var deleteFloorSupabaseService = () => {
|
|
|
4566
4699
|
};
|
|
4567
4700
|
|
|
4568
4701
|
// src/services/pos-service/supabase/delete-table.ts
|
|
4569
|
-
import { useCallback as
|
|
4702
|
+
import { useCallback as useCallback43 } from "react";
|
|
4570
4703
|
var deleteTableSupabaseService = () => {
|
|
4571
4704
|
const supabase = useSupabaseOptional();
|
|
4572
|
-
const deleteTableSupabase =
|
|
4705
|
+
const deleteTableSupabase = useCallback43(
|
|
4573
4706
|
async (values) => {
|
|
4574
4707
|
if (!supabase) {
|
|
4575
4708
|
console.error("Supabase client not initialized");
|
|
@@ -4595,10 +4728,10 @@ var deleteTableSupabaseService = () => {
|
|
|
4595
4728
|
};
|
|
4596
4729
|
|
|
4597
4730
|
// src/services/pos-service/supabase/create-order.ts
|
|
4598
|
-
import { useCallback as
|
|
4731
|
+
import { useCallback as useCallback44 } from "react";
|
|
4599
4732
|
var createOrderSupabaseService = () => {
|
|
4600
4733
|
const supabase = useSupabaseOptional();
|
|
4601
|
-
const createOrderSupabase =
|
|
4734
|
+
const createOrderSupabase = useCallback44(
|
|
4602
4735
|
async (values) => {
|
|
4603
4736
|
if (!supabase) {
|
|
4604
4737
|
console.error("Supabase client not initialized");
|
|
@@ -4633,10 +4766,10 @@ var createOrderSupabaseService = () => {
|
|
|
4633
4766
|
};
|
|
4634
4767
|
|
|
4635
4768
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4636
|
-
import { useCallback as
|
|
4769
|
+
import { useCallback as useCallback45 } from "react";
|
|
4637
4770
|
var addProductToOrderSupabaseService = () => {
|
|
4638
4771
|
const supabase = useSupabaseOptional();
|
|
4639
|
-
const addProductToOrderSupabase =
|
|
4772
|
+
const addProductToOrderSupabase = useCallback45(
|
|
4640
4773
|
async (values) => {
|
|
4641
4774
|
if (!supabase) {
|
|
4642
4775
|
console.error("Supabase client not initialized");
|
|
@@ -4673,10 +4806,10 @@ var addProductToOrderSupabaseService = () => {
|
|
|
4673
4806
|
};
|
|
4674
4807
|
|
|
4675
4808
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4676
|
-
import { useCallback as
|
|
4809
|
+
import { useCallback as useCallback46 } from "react";
|
|
4677
4810
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
4678
4811
|
const supabase = useSupabaseOptional();
|
|
4679
|
-
const updateOrderTotalAmountSupabase =
|
|
4812
|
+
const updateOrderTotalAmountSupabase = useCallback46(
|
|
4680
4813
|
async (values) => {
|
|
4681
4814
|
if (!supabase) {
|
|
4682
4815
|
console.error("Supabase client not initialized");
|
|
@@ -4706,10 +4839,10 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
4706
4839
|
};
|
|
4707
4840
|
|
|
4708
4841
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
4709
|
-
import { useCallback as
|
|
4842
|
+
import { useCallback as useCallback47 } from "react";
|
|
4710
4843
|
var updateOrderLineSupabaseService = () => {
|
|
4711
4844
|
const supabase = useSupabaseOptional();
|
|
4712
|
-
const updateOrderLineSupabase =
|
|
4845
|
+
const updateOrderLineSupabase = useCallback47(
|
|
4713
4846
|
async (values) => {
|
|
4714
4847
|
if (!supabase) {
|
|
4715
4848
|
console.error("Supabase client not initialized");
|
|
@@ -4741,10 +4874,10 @@ var updateOrderLineSupabaseService = () => {
|
|
|
4741
4874
|
};
|
|
4742
4875
|
|
|
4743
4876
|
// src/services/pos-service/supabase/update-order.ts
|
|
4744
|
-
import { useCallback as
|
|
4877
|
+
import { useCallback as useCallback48 } from "react";
|
|
4745
4878
|
var updateOrderSupabaseService = () => {
|
|
4746
4879
|
const supabase = useSupabaseOptional();
|
|
4747
|
-
const updateOrderSupabase =
|
|
4880
|
+
const updateOrderSupabase = useCallback48(
|
|
4748
4881
|
async (values) => {
|
|
4749
4882
|
if (!supabase) {
|
|
4750
4883
|
console.error("Supabase client not initialized");
|
|
@@ -4778,10 +4911,10 @@ var updateOrderSupabaseService = () => {
|
|
|
4778
4911
|
};
|
|
4779
4912
|
|
|
4780
4913
|
// src/services/pos-service/supabase/delete-order.ts
|
|
4781
|
-
import { useCallback as
|
|
4914
|
+
import { useCallback as useCallback49 } from "react";
|
|
4782
4915
|
var deleteOrderSupabaseService = () => {
|
|
4783
4916
|
const supabase = useSupabaseOptional();
|
|
4784
|
-
const deleteOrderSupabase =
|
|
4917
|
+
const deleteOrderSupabase = useCallback49(
|
|
4785
4918
|
async (values) => {
|
|
4786
4919
|
if (!supabase) {
|
|
4787
4920
|
console.error("Supabase client not initialized");
|
|
@@ -4807,10 +4940,10 @@ var deleteOrderSupabaseService = () => {
|
|
|
4807
4940
|
};
|
|
4808
4941
|
|
|
4809
4942
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4810
|
-
import { useCallback as
|
|
4943
|
+
import { useCallback as useCallback50 } from "react";
|
|
4811
4944
|
var deleteOrderLineSupabaseService = () => {
|
|
4812
4945
|
const supabase = useSupabaseOptional();
|
|
4813
|
-
const deleteOrderLineSupabase =
|
|
4946
|
+
const deleteOrderLineSupabase = useCallback50(
|
|
4814
4947
|
async (values) => {
|
|
4815
4948
|
if (!supabase) {
|
|
4816
4949
|
console.error("Supabase client not initialized");
|
|
@@ -4836,10 +4969,10 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
4836
4969
|
};
|
|
4837
4970
|
|
|
4838
4971
|
// src/services/pos-service/supabase/add-category.ts
|
|
4839
|
-
import { useCallback as
|
|
4972
|
+
import { useCallback as useCallback51 } from "react";
|
|
4840
4973
|
var addCategorySupabaseService = () => {
|
|
4841
4974
|
const supabase = useSupabaseOptional();
|
|
4842
|
-
const addCategorySupabase =
|
|
4975
|
+
const addCategorySupabase = useCallback51(
|
|
4843
4976
|
async (values) => {
|
|
4844
4977
|
if (!supabase) {
|
|
4845
4978
|
console.error("Supabase client not initialized");
|
|
@@ -4867,10 +5000,10 @@ var addCategorySupabaseService = () => {
|
|
|
4867
5000
|
};
|
|
4868
5001
|
|
|
4869
5002
|
// src/services/pos-service/supabase/add-product.ts
|
|
4870
|
-
import { useCallback as
|
|
5003
|
+
import { useCallback as useCallback52 } from "react";
|
|
4871
5004
|
var addProductSupabaseService = () => {
|
|
4872
5005
|
const supabase = useSupabaseOptional();
|
|
4873
|
-
const addProductSupabase =
|
|
5006
|
+
const addProductSupabase = useCallback52(
|
|
4874
5007
|
async (values) => {
|
|
4875
5008
|
if (!supabase) {
|
|
4876
5009
|
console.error("Supabase client not initialized");
|
|
@@ -4912,10 +5045,10 @@ var addProductSupabaseService = () => {
|
|
|
4912
5045
|
};
|
|
4913
5046
|
|
|
4914
5047
|
// src/services/pos-service/supabase/add-payment-method.ts
|
|
4915
|
-
import { useCallback as
|
|
5048
|
+
import { useCallback as useCallback53 } from "react";
|
|
4916
5049
|
var addPaymentMethodSupabaseService = () => {
|
|
4917
5050
|
const supabase = useSupabaseOptional();
|
|
4918
|
-
const addPaymentMethodSupabase =
|
|
5051
|
+
const addPaymentMethodSupabase = useCallback53(
|
|
4919
5052
|
async (values) => {
|
|
4920
5053
|
if (!supabase) {
|
|
4921
5054
|
console.error("Supabase client not initialized");
|
|
@@ -4946,10 +5079,10 @@ var addPaymentMethodSupabaseService = () => {
|
|
|
4946
5079
|
};
|
|
4947
5080
|
|
|
4948
5081
|
// src/services/pos-service/supabase/update-session-payment-methods.ts
|
|
4949
|
-
import { useCallback as
|
|
5082
|
+
import { useCallback as useCallback54 } from "react";
|
|
4950
5083
|
var updateSessionPaymentMethodsSupabaseService = () => {
|
|
4951
5084
|
const supabase = useSupabaseOptional();
|
|
4952
|
-
const updateSessionPaymentMethodsSupabase =
|
|
5085
|
+
const updateSessionPaymentMethodsSupabase = useCallback54(
|
|
4953
5086
|
async (values) => {
|
|
4954
5087
|
if (!supabase) {
|
|
4955
5088
|
console.error("Supabase client not initialized");
|
|
@@ -4978,10 +5111,10 @@ var updateSessionPaymentMethodsSupabaseService = () => {
|
|
|
4978
5111
|
};
|
|
4979
5112
|
|
|
4980
5113
|
// src/services/pos-service/supabase/create-payment.ts
|
|
4981
|
-
import { useCallback as
|
|
5114
|
+
import { useCallback as useCallback55 } from "react";
|
|
4982
5115
|
var createPaymentSupabaseService = () => {
|
|
4983
5116
|
const supabase = useSupabaseOptional();
|
|
4984
|
-
const createPaymentSupabase =
|
|
5117
|
+
const createPaymentSupabase = useCallback55(
|
|
4985
5118
|
async (values) => {
|
|
4986
5119
|
if (!supabase) {
|
|
4987
5120
|
console.error("Supabase client not initialized");
|
|
@@ -5022,10 +5155,10 @@ var createPaymentSupabaseService = () => {
|
|
|
5022
5155
|
};
|
|
5023
5156
|
|
|
5024
5157
|
// src/services/pos-service/supabase/create-customer.ts
|
|
5025
|
-
import { useCallback as
|
|
5158
|
+
import { useCallback as useCallback56 } from "react";
|
|
5026
5159
|
var createCustomerSupabaseService = () => {
|
|
5027
5160
|
const supabase = useSupabaseOptional();
|
|
5028
|
-
const createCustomerSupabase =
|
|
5161
|
+
const createCustomerSupabase = useCallback56(
|
|
5029
5162
|
async (values) => {
|
|
5030
5163
|
if (!supabase) {
|
|
5031
5164
|
console.error("Supabase client not initialized");
|
|
@@ -5063,10 +5196,10 @@ var createCustomerSupabaseService = () => {
|
|
|
5063
5196
|
};
|
|
5064
5197
|
|
|
5065
5198
|
// src/services/pos-service/supabase/update-customer.ts
|
|
5066
|
-
import { useCallback as
|
|
5199
|
+
import { useCallback as useCallback57 } from "react";
|
|
5067
5200
|
var updateCustomerSupabaseService = () => {
|
|
5068
5201
|
const supabase = useSupabaseOptional();
|
|
5069
|
-
const updateCustomerSupabase =
|
|
5202
|
+
const updateCustomerSupabase = useCallback57(
|
|
5070
5203
|
async (values) => {
|
|
5071
5204
|
if (!supabase) {
|
|
5072
5205
|
console.error("Supabase client not initialized");
|
|
@@ -5097,10 +5230,10 @@ var updateCustomerSupabaseService = () => {
|
|
|
5097
5230
|
};
|
|
5098
5231
|
|
|
5099
5232
|
// src/services/pos-service/supabase/delete-customer.ts
|
|
5100
|
-
import { useCallback as
|
|
5233
|
+
import { useCallback as useCallback58 } from "react";
|
|
5101
5234
|
var deleteCustomerSupabaseService = () => {
|
|
5102
5235
|
const supabase = useSupabaseOptional();
|
|
5103
|
-
const deleteCustomerSupabase =
|
|
5236
|
+
const deleteCustomerSupabase = useCallback58(
|
|
5104
5237
|
async (values) => {
|
|
5105
5238
|
if (!supabase) {
|
|
5106
5239
|
console.error("Supabase client not initialized");
|
|
@@ -5126,10 +5259,10 @@ var deleteCustomerSupabaseService = () => {
|
|
|
5126
5259
|
};
|
|
5127
5260
|
|
|
5128
5261
|
// src/services/pos-service/supabase/upload-image.ts
|
|
5129
|
-
import { useCallback as
|
|
5262
|
+
import { useCallback as useCallback59 } from "react";
|
|
5130
5263
|
var uploadImageSupabaseService = () => {
|
|
5131
5264
|
const supabase = useSupabaseOptional();
|
|
5132
|
-
const uploadImageSupabase =
|
|
5265
|
+
const uploadImageSupabase = useCallback59(
|
|
5133
5266
|
async (file, tenantId) => {
|
|
5134
5267
|
if (!supabase) {
|
|
5135
5268
|
console.error("Supabase client not initialized");
|
|
@@ -5164,9 +5297,9 @@ var uploadImageSupabaseService = () => {
|
|
|
5164
5297
|
};
|
|
5165
5298
|
|
|
5166
5299
|
// src/services/pos-service/supabase/get-list-users.ts
|
|
5167
|
-
import { useCallback as
|
|
5300
|
+
import { useCallback as useCallback60 } from "react";
|
|
5168
5301
|
var getListUsersService = (env) => {
|
|
5169
|
-
const getListUsers =
|
|
5302
|
+
const getListUsers = useCallback60(
|
|
5170
5303
|
({ tenantId }) => {
|
|
5171
5304
|
const jsonData = {
|
|
5172
5305
|
model: "tenant.users",
|
|
@@ -5187,9 +5320,9 @@ var getListUsersService = (env) => {
|
|
|
5187
5320
|
};
|
|
5188
5321
|
|
|
5189
5322
|
// src/services/pos-service/supabase/get-list-roles.ts
|
|
5190
|
-
import { useCallback as
|
|
5323
|
+
import { useCallback as useCallback61 } from "react";
|
|
5191
5324
|
var getListRolesService = (env) => {
|
|
5192
|
-
const getListRoles =
|
|
5325
|
+
const getListRoles = useCallback61(
|
|
5193
5326
|
({ tenantId }) => {
|
|
5194
5327
|
const jsonData = {
|
|
5195
5328
|
model: "tenant.roles",
|
|
@@ -5210,9 +5343,9 @@ var getListRolesService = (env) => {
|
|
|
5210
5343
|
};
|
|
5211
5344
|
|
|
5212
5345
|
// src/services/pos-service/supabase/assign-role.ts
|
|
5213
|
-
import { useCallback as
|
|
5346
|
+
import { useCallback as useCallback62 } from "react";
|
|
5214
5347
|
var assignRoleService = (env) => {
|
|
5215
|
-
const assignRole =
|
|
5348
|
+
const assignRole = useCallback62(
|
|
5216
5349
|
({
|
|
5217
5350
|
tenantId,
|
|
5218
5351
|
userId,
|
|
@@ -5241,10 +5374,10 @@ var assignRoleService = (env) => {
|
|
|
5241
5374
|
};
|
|
5242
5375
|
|
|
5243
5376
|
// src/services/pos-service/supabase/get-states.ts
|
|
5244
|
-
import { useCallback as
|
|
5377
|
+
import { useCallback as useCallback63 } from "react";
|
|
5245
5378
|
var getStatesSupabaseService = () => {
|
|
5246
5379
|
const supabase = useSupabaseOptional();
|
|
5247
|
-
const getStatesSupabase =
|
|
5380
|
+
const getStatesSupabase = useCallback63(async () => {
|
|
5248
5381
|
if (!supabase) return { length: 0, records: [] };
|
|
5249
5382
|
const { data, error } = await supabase.from("states" /* STATES */).select("*");
|
|
5250
5383
|
if (error) {
|
|
@@ -5260,10 +5393,10 @@ var getStatesSupabaseService = () => {
|
|
|
5260
5393
|
};
|
|
5261
5394
|
|
|
5262
5395
|
// src/services/pos-service/supabase/get-wards.ts
|
|
5263
|
-
import { useCallback as
|
|
5396
|
+
import { useCallback as useCallback64 } from "react";
|
|
5264
5397
|
var getWardsSupabaseService = () => {
|
|
5265
5398
|
const supabase = useSupabaseOptional();
|
|
5266
|
-
const getWardsSupabase =
|
|
5399
|
+
const getWardsSupabase = useCallback64(async () => {
|
|
5267
5400
|
if (!supabase) return { length: 0, records: [] };
|
|
5268
5401
|
const { data, error } = await supabase.from("wards" /* WARDS */).select("*");
|
|
5269
5402
|
if (error) {
|
|
@@ -5279,10 +5412,10 @@ var getWardsSupabaseService = () => {
|
|
|
5279
5412
|
};
|
|
5280
5413
|
|
|
5281
5414
|
// src/services/pos-service/supabase/get-partner-titles.ts
|
|
5282
|
-
import { useCallback as
|
|
5415
|
+
import { useCallback as useCallback65 } from "react";
|
|
5283
5416
|
var getPartnerTitlesSupabaseService = () => {
|
|
5284
5417
|
const supabase = useSupabaseOptional();
|
|
5285
|
-
const getPartnerTitlesSupabase =
|
|
5418
|
+
const getPartnerTitlesSupabase = useCallback65(async () => {
|
|
5286
5419
|
if (!supabase) return { length: 0, records: [] };
|
|
5287
5420
|
const { data, error } = await supabase.from("partner_titles" /* PARTNER_TITLES */).select("*");
|
|
5288
5421
|
if (error) {
|
|
@@ -5298,9 +5431,9 @@ var getPartnerTitlesSupabaseService = () => {
|
|
|
5298
5431
|
};
|
|
5299
5432
|
|
|
5300
5433
|
// src/services/pos-service/supabase/get-supa-current-user.ts
|
|
5301
|
-
import { useCallback as
|
|
5434
|
+
import { useCallback as useCallback66 } from "react";
|
|
5302
5435
|
var getSupaCurrentUser = (env) => {
|
|
5303
|
-
const getSupaCurrentUser2 =
|
|
5436
|
+
const getSupaCurrentUser2 = useCallback66(
|
|
5304
5437
|
({ tenantId }) => {
|
|
5305
5438
|
return env?.requests.get("/api/v2/auth/me" /* SUPABASE_CURRENT_USER */, {
|
|
5306
5439
|
headers: {
|
|
@@ -5317,10 +5450,10 @@ var getSupaCurrentUser = (env) => {
|
|
|
5317
5450
|
};
|
|
5318
5451
|
|
|
5319
5452
|
// src/services/pos-service/supabase/update-category.ts
|
|
5320
|
-
import { useCallback as
|
|
5453
|
+
import { useCallback as useCallback67 } from "react";
|
|
5321
5454
|
var updateCategorySupabaseService = () => {
|
|
5322
5455
|
const supabase = useSupabaseOptional();
|
|
5323
|
-
const updateCategorySupabase =
|
|
5456
|
+
const updateCategorySupabase = useCallback67(
|
|
5324
5457
|
async (values) => {
|
|
5325
5458
|
if (!supabase) {
|
|
5326
5459
|
console.error("Supabase client not initialized");
|
|
@@ -5347,10 +5480,10 @@ var updateCategorySupabaseService = () => {
|
|
|
5347
5480
|
};
|
|
5348
5481
|
|
|
5349
5482
|
// src/services/pos-service/supabase/delete-category.ts
|
|
5350
|
-
import { useCallback as
|
|
5483
|
+
import { useCallback as useCallback68 } from "react";
|
|
5351
5484
|
var deleteCategorySupabaseService = () => {
|
|
5352
5485
|
const supabase = useSupabaseOptional();
|
|
5353
|
-
const deleteCategorySupabase =
|
|
5486
|
+
const deleteCategorySupabase = useCallback68(
|
|
5354
5487
|
async (values) => {
|
|
5355
5488
|
if (!supabase) {
|
|
5356
5489
|
console.error("Supabase client not initialized");
|
|
@@ -5376,10 +5509,10 @@ var deleteCategorySupabaseService = () => {
|
|
|
5376
5509
|
};
|
|
5377
5510
|
|
|
5378
5511
|
// src/services/pos-service/supabase/update-product.ts
|
|
5379
|
-
import { useCallback as
|
|
5512
|
+
import { useCallback as useCallback69 } from "react";
|
|
5380
5513
|
var updateProductSupabaseService = () => {
|
|
5381
5514
|
const supabase = useSupabaseOptional();
|
|
5382
|
-
const updateProductSupabase =
|
|
5515
|
+
const updateProductSupabase = useCallback69(
|
|
5383
5516
|
async (values) => {
|
|
5384
5517
|
if (!supabase) {
|
|
5385
5518
|
console.error("Supabase client not initialized");
|
|
@@ -5407,10 +5540,10 @@ var updateProductSupabaseService = () => {
|
|
|
5407
5540
|
};
|
|
5408
5541
|
|
|
5409
5542
|
// src/services/pos-service/supabase/delete-product.ts
|
|
5410
|
-
import { useCallback as
|
|
5543
|
+
import { useCallback as useCallback70 } from "react";
|
|
5411
5544
|
var deleteProductSupabaseService = () => {
|
|
5412
5545
|
const supabase = useSupabaseOptional();
|
|
5413
|
-
const deleteProductSupabase =
|
|
5546
|
+
const deleteProductSupabase = useCallback70(
|
|
5414
5547
|
async (values) => {
|
|
5415
5548
|
if (!supabase) {
|
|
5416
5549
|
console.error("Supabase client not initialized");
|
|
@@ -5467,6 +5600,10 @@ var serviceFactories = [
|
|
|
5467
5600
|
updateEntityService,
|
|
5468
5601
|
updateOrderStatusService,
|
|
5469
5602
|
completeCurrentStageService,
|
|
5603
|
+
appAuthenticateService,
|
|
5604
|
+
applyVoucherService,
|
|
5605
|
+
removeVoucherService,
|
|
5606
|
+
syncFromUiService,
|
|
5470
5607
|
addFloorSupabaseService,
|
|
5471
5608
|
addTableSupabaseService,
|
|
5472
5609
|
updateFloorSupabaseService,
|
|
@@ -5620,99 +5757,111 @@ import { useMutation as useMutation87 } from "@tanstack/react-query";
|
|
|
5620
5757
|
// src/hooks/pos/use-complete-current-stage.ts
|
|
5621
5758
|
import { useMutation as useMutation88 } from "@tanstack/react-query";
|
|
5622
5759
|
|
|
5623
|
-
// src/hooks/pos/
|
|
5760
|
+
// src/hooks/pos/use-app-authenticate.ts
|
|
5624
5761
|
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
5625
5762
|
|
|
5626
|
-
// src/hooks/pos/
|
|
5763
|
+
// src/hooks/pos/use-apply-voucher.ts
|
|
5627
5764
|
import { useMutation as useMutation90 } from "@tanstack/react-query";
|
|
5628
5765
|
|
|
5629
|
-
// src/hooks/pos/
|
|
5766
|
+
// src/hooks/pos/use-remove-voucher.ts
|
|
5630
5767
|
import { useMutation as useMutation91 } from "@tanstack/react-query";
|
|
5631
5768
|
|
|
5632
|
-
// src/hooks/pos/
|
|
5769
|
+
// src/hooks/pos/use-sync-from-ui.ts
|
|
5633
5770
|
import { useMutation as useMutation92 } from "@tanstack/react-query";
|
|
5634
5771
|
|
|
5635
|
-
// src/hooks/pos/supabase/use-
|
|
5772
|
+
// src/hooks/pos/supabase/use-add-floor.ts
|
|
5636
5773
|
import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
5637
5774
|
|
|
5638
|
-
// src/hooks/pos/supabase/use-
|
|
5775
|
+
// src/hooks/pos/supabase/use-add-table.ts
|
|
5639
5776
|
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
5640
5777
|
|
|
5641
|
-
// src/hooks/pos/supabase/use-
|
|
5778
|
+
// src/hooks/pos/supabase/use-update-floor.ts
|
|
5642
5779
|
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
5643
5780
|
|
|
5644
|
-
// src/hooks/pos/supabase/use-
|
|
5781
|
+
// src/hooks/pos/supabase/use-update-table.ts
|
|
5645
5782
|
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
5646
5783
|
|
|
5647
|
-
// src/hooks/pos/supabase/use-
|
|
5784
|
+
// src/hooks/pos/supabase/use-delete-floor.ts
|
|
5648
5785
|
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
5649
5786
|
|
|
5650
|
-
// src/hooks/pos/supabase/use-
|
|
5787
|
+
// src/hooks/pos/supabase/use-delete-table.ts
|
|
5651
5788
|
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
5652
5789
|
|
|
5653
|
-
// src/hooks/pos/supabase/use-
|
|
5790
|
+
// src/hooks/pos/supabase/use-create-order.ts
|
|
5654
5791
|
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
5655
5792
|
|
|
5656
|
-
// src/hooks/pos/supabase/use-
|
|
5793
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
5657
5794
|
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
5658
5795
|
|
|
5659
|
-
// src/hooks/pos/supabase/use-
|
|
5796
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
5660
5797
|
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
5661
5798
|
|
|
5662
|
-
// src/hooks/pos/supabase/use-
|
|
5799
|
+
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
5663
5800
|
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
5664
5801
|
|
|
5665
|
-
// src/hooks/pos/supabase/use-
|
|
5802
|
+
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
5666
5803
|
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
5667
5804
|
|
|
5668
|
-
// src/hooks/pos/use-
|
|
5805
|
+
// src/hooks/pos/supabase/use-update-order.ts
|
|
5669
5806
|
import { useMutation as useMutation104 } from "@tanstack/react-query";
|
|
5670
5807
|
|
|
5671
|
-
// src/hooks/pos/supabase/use-
|
|
5808
|
+
// src/hooks/pos/supabase/use-delete-order.ts
|
|
5672
5809
|
import { useMutation as useMutation105 } from "@tanstack/react-query";
|
|
5673
5810
|
|
|
5674
|
-
// src/hooks/pos/supabase/use-
|
|
5811
|
+
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
5675
5812
|
import { useMutation as useMutation106 } from "@tanstack/react-query";
|
|
5676
5813
|
|
|
5677
|
-
// src/hooks/pos/supabase/use-
|
|
5814
|
+
// src/hooks/pos/supabase/use-add-product.ts
|
|
5678
5815
|
import { useMutation as useMutation107 } from "@tanstack/react-query";
|
|
5679
5816
|
|
|
5680
|
-
// src/hooks/pos/
|
|
5817
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
5681
5818
|
import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
5682
5819
|
|
|
5683
|
-
// src/hooks/pos/supabase/use-
|
|
5820
|
+
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
5684
5821
|
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
5685
5822
|
|
|
5686
|
-
// src/hooks/pos/supabase/use-
|
|
5823
|
+
// src/hooks/pos/supabase/use-update-session-payment-methods.ts
|
|
5687
5824
|
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
5688
5825
|
|
|
5689
|
-
// src/hooks/pos/supabase/use-
|
|
5826
|
+
// src/hooks/pos/supabase/use-create-payment.ts
|
|
5690
5827
|
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
5691
5828
|
|
|
5692
|
-
// src/hooks/pos/supabase/use-
|
|
5829
|
+
// src/hooks/pos/supabase/use-create-customer.ts
|
|
5693
5830
|
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
5694
5831
|
|
|
5695
|
-
// src/hooks/pos/supabase/use-
|
|
5832
|
+
// src/hooks/pos/supabase/use-update-customer.ts
|
|
5696
5833
|
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
5697
5834
|
|
|
5698
|
-
// src/hooks/pos/supabase/use-
|
|
5835
|
+
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
5699
5836
|
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
5700
5837
|
|
|
5701
|
-
// src/hooks/pos/supabase/use-
|
|
5838
|
+
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
5702
5839
|
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
5703
5840
|
|
|
5704
|
-
// src/hooks/pos/supabase/use-
|
|
5841
|
+
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
5705
5842
|
import { useMutation as useMutation116 } from "@tanstack/react-query";
|
|
5706
5843
|
|
|
5707
|
-
// src/hooks/pos/supabase/use-
|
|
5844
|
+
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
5708
5845
|
import { useMutation as useMutation117 } from "@tanstack/react-query";
|
|
5709
5846
|
|
|
5710
|
-
// src/hooks/pos/supabase/use-
|
|
5847
|
+
// src/hooks/pos/supabase/use-assign-role.ts
|
|
5711
5848
|
import { useMutation as useMutation118 } from "@tanstack/react-query";
|
|
5712
5849
|
|
|
5713
|
-
// src/hooks/pos/supabase/use-
|
|
5850
|
+
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
5714
5851
|
import { useMutation as useMutation119 } from "@tanstack/react-query";
|
|
5715
5852
|
|
|
5853
|
+
// src/hooks/pos/supabase/use-update-category.ts
|
|
5854
|
+
import { useMutation as useMutation120 } from "@tanstack/react-query";
|
|
5855
|
+
|
|
5856
|
+
// src/hooks/pos/supabase/use-delete-category.ts
|
|
5857
|
+
import { useMutation as useMutation121 } from "@tanstack/react-query";
|
|
5858
|
+
|
|
5859
|
+
// src/hooks/pos/supabase/use-update-product.ts
|
|
5860
|
+
import { useMutation as useMutation122 } from "@tanstack/react-query";
|
|
5861
|
+
|
|
5862
|
+
// src/hooks/pos/supabase/use-delete-product.ts
|
|
5863
|
+
import { useMutation as useMutation123 } from "@tanstack/react-query";
|
|
5864
|
+
|
|
5716
5865
|
// src/provider/service-provider.tsx
|
|
5717
5866
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5718
5867
|
var ServiceContext = createContext3(null);
|
|
@@ -5724,7 +5873,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5724
5873
|
// src/services/action-service/index.ts
|
|
5725
5874
|
function useActionService() {
|
|
5726
5875
|
const { env } = useEnv();
|
|
5727
|
-
const loadAction =
|
|
5876
|
+
const loadAction = useCallback71(
|
|
5728
5877
|
async ({
|
|
5729
5878
|
idAction,
|
|
5730
5879
|
context,
|
|
@@ -5748,7 +5897,7 @@ function useActionService() {
|
|
|
5748
5897
|
},
|
|
5749
5898
|
[env]
|
|
5750
5899
|
);
|
|
5751
|
-
const callButton =
|
|
5900
|
+
const callButton = useCallback71(
|
|
5752
5901
|
async ({
|
|
5753
5902
|
model,
|
|
5754
5903
|
ids = [],
|
|
@@ -5782,7 +5931,7 @@ function useActionService() {
|
|
|
5782
5931
|
},
|
|
5783
5932
|
[env]
|
|
5784
5933
|
);
|
|
5785
|
-
const removeRows =
|
|
5934
|
+
const removeRows = useCallback71(
|
|
5786
5935
|
async ({
|
|
5787
5936
|
model,
|
|
5788
5937
|
ids,
|
|
@@ -5808,7 +5957,7 @@ function useActionService() {
|
|
|
5808
5957
|
},
|
|
5809
5958
|
[env]
|
|
5810
5959
|
);
|
|
5811
|
-
const duplicateRecord =
|
|
5960
|
+
const duplicateRecord = useCallback71(
|
|
5812
5961
|
async ({
|
|
5813
5962
|
model,
|
|
5814
5963
|
id,
|
|
@@ -5834,7 +5983,7 @@ function useActionService() {
|
|
|
5834
5983
|
},
|
|
5835
5984
|
[env]
|
|
5836
5985
|
);
|
|
5837
|
-
const getPrintReportName =
|
|
5986
|
+
const getPrintReportName = useCallback71(
|
|
5838
5987
|
async ({ id }) => {
|
|
5839
5988
|
const jsonData = {
|
|
5840
5989
|
model: "ir.actions.report",
|
|
@@ -5852,7 +6001,7 @@ function useActionService() {
|
|
|
5852
6001
|
},
|
|
5853
6002
|
[env]
|
|
5854
6003
|
);
|
|
5855
|
-
const print =
|
|
6004
|
+
const print = useCallback71(
|
|
5856
6005
|
async ({ id, report, db }) => {
|
|
5857
6006
|
const jsonData = {
|
|
5858
6007
|
report,
|
|
@@ -5870,7 +6019,7 @@ function useActionService() {
|
|
|
5870
6019
|
},
|
|
5871
6020
|
[env]
|
|
5872
6021
|
);
|
|
5873
|
-
const runAction =
|
|
6022
|
+
const runAction = useCallback71(
|
|
5874
6023
|
async ({
|
|
5875
6024
|
idAction,
|
|
5876
6025
|
context,
|
|
@@ -5897,7 +6046,7 @@ function useActionService() {
|
|
|
5897
6046
|
},
|
|
5898
6047
|
[env]
|
|
5899
6048
|
);
|
|
5900
|
-
const generateSerialNumber =
|
|
6049
|
+
const generateSerialNumber = useCallback71(
|
|
5901
6050
|
async ({
|
|
5902
6051
|
kwargs,
|
|
5903
6052
|
context,
|
|
@@ -5922,7 +6071,7 @@ function useActionService() {
|
|
|
5922
6071
|
},
|
|
5923
6072
|
[env]
|
|
5924
6073
|
);
|
|
5925
|
-
const actionServerHome =
|
|
6074
|
+
const actionServerHome = useCallback71(async () => {
|
|
5926
6075
|
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5927
6076
|
}, [env]);
|
|
5928
6077
|
return {
|
|
@@ -5939,11 +6088,11 @@ function useActionService() {
|
|
|
5939
6088
|
}
|
|
5940
6089
|
|
|
5941
6090
|
// src/services/auth-service/index.ts
|
|
5942
|
-
import { useCallback as
|
|
6091
|
+
import { useCallback as useCallback72 } from "react";
|
|
5943
6092
|
function useAuthService() {
|
|
5944
6093
|
const { env } = useEnv();
|
|
5945
6094
|
const supabase = useSupabaseOptional();
|
|
5946
|
-
const login =
|
|
6095
|
+
const login = useCallback72(
|
|
5947
6096
|
async (body) => {
|
|
5948
6097
|
const payload = Object.fromEntries(
|
|
5949
6098
|
Object.entries({
|
|
@@ -5968,7 +6117,7 @@ function useAuthService() {
|
|
|
5968
6117
|
},
|
|
5969
6118
|
[env]
|
|
5970
6119
|
);
|
|
5971
|
-
const loginTenantUser =
|
|
6120
|
+
const loginTenantUser = useCallback72(
|
|
5972
6121
|
async (body) => {
|
|
5973
6122
|
const payload = {
|
|
5974
6123
|
email: body.email,
|
|
@@ -5983,7 +6132,7 @@ function useAuthService() {
|
|
|
5983
6132
|
},
|
|
5984
6133
|
[env]
|
|
5985
6134
|
);
|
|
5986
|
-
const forgotPassword =
|
|
6135
|
+
const forgotPassword = useCallback72(
|
|
5987
6136
|
async (email) => {
|
|
5988
6137
|
const bodyData = {
|
|
5989
6138
|
login: email,
|
|
@@ -5997,7 +6146,7 @@ function useAuthService() {
|
|
|
5997
6146
|
},
|
|
5998
6147
|
[env]
|
|
5999
6148
|
);
|
|
6000
|
-
const forgotPasswordSSO =
|
|
6149
|
+
const forgotPasswordSSO = useCallback72(
|
|
6001
6150
|
async ({
|
|
6002
6151
|
email,
|
|
6003
6152
|
with_context,
|
|
@@ -6020,7 +6169,7 @@ function useAuthService() {
|
|
|
6020
6169
|
},
|
|
6021
6170
|
[env]
|
|
6022
6171
|
);
|
|
6023
|
-
const resetPassword =
|
|
6172
|
+
const resetPassword = useCallback72(
|
|
6024
6173
|
async (data, token) => {
|
|
6025
6174
|
const bodyData = {
|
|
6026
6175
|
token,
|
|
@@ -6035,7 +6184,7 @@ function useAuthService() {
|
|
|
6035
6184
|
},
|
|
6036
6185
|
[env]
|
|
6037
6186
|
);
|
|
6038
|
-
const resetPasswordSSO =
|
|
6187
|
+
const resetPasswordSSO = useCallback72(
|
|
6039
6188
|
async ({
|
|
6040
6189
|
method,
|
|
6041
6190
|
password,
|
|
@@ -6058,7 +6207,7 @@ function useAuthService() {
|
|
|
6058
6207
|
},
|
|
6059
6208
|
[env]
|
|
6060
6209
|
);
|
|
6061
|
-
const updatePassword =
|
|
6210
|
+
const updatePassword = useCallback72(
|
|
6062
6211
|
async (data, token) => {
|
|
6063
6212
|
const bodyData = {
|
|
6064
6213
|
token,
|
|
@@ -6073,7 +6222,7 @@ function useAuthService() {
|
|
|
6073
6222
|
},
|
|
6074
6223
|
[env]
|
|
6075
6224
|
);
|
|
6076
|
-
const isValidToken =
|
|
6225
|
+
const isValidToken = useCallback72(
|
|
6077
6226
|
async (token) => {
|
|
6078
6227
|
const bodyData = {
|
|
6079
6228
|
token
|
|
@@ -6086,7 +6235,7 @@ function useAuthService() {
|
|
|
6086
6235
|
},
|
|
6087
6236
|
[env]
|
|
6088
6237
|
);
|
|
6089
|
-
const isValidActionToken =
|
|
6238
|
+
const isValidActionToken = useCallback72(
|
|
6090
6239
|
async (actionToken) => {
|
|
6091
6240
|
const bodyData = {};
|
|
6092
6241
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -6099,7 +6248,7 @@ function useAuthService() {
|
|
|
6099
6248
|
},
|
|
6100
6249
|
[env]
|
|
6101
6250
|
);
|
|
6102
|
-
const loginSocial =
|
|
6251
|
+
const loginSocial = useCallback72(
|
|
6103
6252
|
async ({
|
|
6104
6253
|
db,
|
|
6105
6254
|
state,
|
|
@@ -6117,13 +6266,13 @@ function useAuthService() {
|
|
|
6117
6266
|
},
|
|
6118
6267
|
[env]
|
|
6119
6268
|
);
|
|
6120
|
-
const getProviders =
|
|
6269
|
+
const getProviders = useCallback72(
|
|
6121
6270
|
async (db) => {
|
|
6122
6271
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
6123
6272
|
},
|
|
6124
6273
|
[env]
|
|
6125
6274
|
);
|
|
6126
|
-
const getAccessByCode =
|
|
6275
|
+
const getAccessByCode = useCallback72(
|
|
6127
6276
|
async (code) => {
|
|
6128
6277
|
const data = new URLSearchParams();
|
|
6129
6278
|
data.append("code", code);
|
|
@@ -6143,7 +6292,7 @@ function useAuthService() {
|
|
|
6143
6292
|
},
|
|
6144
6293
|
[env]
|
|
6145
6294
|
);
|
|
6146
|
-
const logout =
|
|
6295
|
+
const logout = useCallback72(
|
|
6147
6296
|
async (service) => {
|
|
6148
6297
|
return env?.requests?.post(
|
|
6149
6298
|
"/logout" /* LOGOUT */,
|
|
@@ -6160,7 +6309,7 @@ function useAuthService() {
|
|
|
6160
6309
|
},
|
|
6161
6310
|
[env]
|
|
6162
6311
|
);
|
|
6163
|
-
const getTenantMapping =
|
|
6312
|
+
const getTenantMapping = useCallback72(
|
|
6164
6313
|
async ({ shortName, service }) => {
|
|
6165
6314
|
const bodyData = {
|
|
6166
6315
|
short_name: shortName
|
|
@@ -6178,7 +6327,7 @@ function useAuthService() {
|
|
|
6178
6327
|
},
|
|
6179
6328
|
[env]
|
|
6180
6329
|
);
|
|
6181
|
-
const getToken =
|
|
6330
|
+
const getToken = useCallback72(
|
|
6182
6331
|
async ({
|
|
6183
6332
|
phone,
|
|
6184
6333
|
name,
|
|
@@ -6223,10 +6372,10 @@ function useAuthService() {
|
|
|
6223
6372
|
}
|
|
6224
6373
|
|
|
6225
6374
|
// src/services/company-service/index.ts
|
|
6226
|
-
import { useCallback as
|
|
6375
|
+
import { useCallback as useCallback73 } from "react";
|
|
6227
6376
|
function useCompanyService() {
|
|
6228
6377
|
const { env } = useEnv();
|
|
6229
|
-
const getCurrentCompany =
|
|
6378
|
+
const getCurrentCompany = useCallback73(
|
|
6230
6379
|
async (service, extraHeaders) => {
|
|
6231
6380
|
return await env.requests.get(
|
|
6232
6381
|
"/company" /* COMPANY_PATH */,
|
|
@@ -6243,7 +6392,7 @@ function useCompanyService() {
|
|
|
6243
6392
|
},
|
|
6244
6393
|
[env]
|
|
6245
6394
|
);
|
|
6246
|
-
const getInfoCompany =
|
|
6395
|
+
const getInfoCompany = useCallback73(
|
|
6247
6396
|
async (id, service) => {
|
|
6248
6397
|
const jsonData = {
|
|
6249
6398
|
ids: [id],
|
|
@@ -6279,10 +6428,10 @@ function useCompanyService() {
|
|
|
6279
6428
|
}
|
|
6280
6429
|
|
|
6281
6430
|
// src/services/excel-service/index.ts
|
|
6282
|
-
import { useCallback as
|
|
6431
|
+
import { useCallback as useCallback74 } from "react";
|
|
6283
6432
|
function useExcelService() {
|
|
6284
6433
|
const { env } = useEnv();
|
|
6285
|
-
const uploadFileExcel =
|
|
6434
|
+
const uploadFileExcel = useCallback74(
|
|
6286
6435
|
async ({
|
|
6287
6436
|
formData,
|
|
6288
6437
|
service,
|
|
@@ -6299,7 +6448,7 @@ function useExcelService() {
|
|
|
6299
6448
|
},
|
|
6300
6449
|
[env]
|
|
6301
6450
|
);
|
|
6302
|
-
const uploadIdFile =
|
|
6451
|
+
const uploadIdFile = useCallback74(
|
|
6303
6452
|
async ({
|
|
6304
6453
|
formData,
|
|
6305
6454
|
service,
|
|
@@ -6316,7 +6465,7 @@ function useExcelService() {
|
|
|
6316
6465
|
},
|
|
6317
6466
|
[env]
|
|
6318
6467
|
);
|
|
6319
|
-
const parsePreview =
|
|
6468
|
+
const parsePreview = useCallback74(
|
|
6320
6469
|
async ({
|
|
6321
6470
|
id,
|
|
6322
6471
|
selectedSheet,
|
|
@@ -6365,7 +6514,7 @@ function useExcelService() {
|
|
|
6365
6514
|
},
|
|
6366
6515
|
[env]
|
|
6367
6516
|
);
|
|
6368
|
-
const executeImport =
|
|
6517
|
+
const executeImport = useCallback74(
|
|
6369
6518
|
async ({
|
|
6370
6519
|
columns,
|
|
6371
6520
|
fields,
|
|
@@ -6399,7 +6548,7 @@ function useExcelService() {
|
|
|
6399
6548
|
},
|
|
6400
6549
|
[env]
|
|
6401
6550
|
);
|
|
6402
|
-
const getFileExcel =
|
|
6551
|
+
const getFileExcel = useCallback74(
|
|
6403
6552
|
async ({
|
|
6404
6553
|
model,
|
|
6405
6554
|
service,
|
|
@@ -6423,7 +6572,7 @@ function useExcelService() {
|
|
|
6423
6572
|
},
|
|
6424
6573
|
[env]
|
|
6425
6574
|
);
|
|
6426
|
-
const getFieldExport =
|
|
6575
|
+
const getFieldExport = useCallback74(
|
|
6427
6576
|
async ({
|
|
6428
6577
|
ids,
|
|
6429
6578
|
model,
|
|
@@ -6463,7 +6612,7 @@ function useExcelService() {
|
|
|
6463
6612
|
},
|
|
6464
6613
|
[env]
|
|
6465
6614
|
);
|
|
6466
|
-
const exportExcel =
|
|
6615
|
+
const exportExcel = useCallback74(
|
|
6467
6616
|
async ({
|
|
6468
6617
|
model,
|
|
6469
6618
|
domain,
|
|
@@ -6511,10 +6660,10 @@ function useExcelService() {
|
|
|
6511
6660
|
}
|
|
6512
6661
|
|
|
6513
6662
|
// src/services/form-service/index.ts
|
|
6514
|
-
import { useCallback as
|
|
6663
|
+
import { useCallback as useCallback75 } from "react";
|
|
6515
6664
|
function useFormService() {
|
|
6516
6665
|
const { env } = useEnv();
|
|
6517
|
-
const getComment =
|
|
6666
|
+
const getComment = useCallback75(
|
|
6518
6667
|
async ({ data }) => {
|
|
6519
6668
|
const jsonData = {
|
|
6520
6669
|
thread_id: data.thread_id,
|
|
@@ -6532,7 +6681,7 @@ function useFormService() {
|
|
|
6532
6681
|
},
|
|
6533
6682
|
[env]
|
|
6534
6683
|
);
|
|
6535
|
-
const getThreadData =
|
|
6684
|
+
const getThreadData = useCallback75(
|
|
6536
6685
|
async ({
|
|
6537
6686
|
data,
|
|
6538
6687
|
xNode,
|
|
@@ -6559,7 +6708,7 @@ function useFormService() {
|
|
|
6559
6708
|
},
|
|
6560
6709
|
[env]
|
|
6561
6710
|
);
|
|
6562
|
-
const getThreadMessages =
|
|
6711
|
+
const getThreadMessages = useCallback75(
|
|
6563
6712
|
async ({
|
|
6564
6713
|
data,
|
|
6565
6714
|
xNode,
|
|
@@ -6585,7 +6734,7 @@ function useFormService() {
|
|
|
6585
6734
|
},
|
|
6586
6735
|
[env]
|
|
6587
6736
|
);
|
|
6588
|
-
const sentComment =
|
|
6737
|
+
const sentComment = useCallback75(
|
|
6589
6738
|
async ({ data }) => {
|
|
6590
6739
|
const jsonData = {
|
|
6591
6740
|
context: {
|
|
@@ -6613,7 +6762,7 @@ function useFormService() {
|
|
|
6613
6762
|
},
|
|
6614
6763
|
[env]
|
|
6615
6764
|
);
|
|
6616
|
-
const deleteComment =
|
|
6765
|
+
const deleteComment = useCallback75(
|
|
6617
6766
|
async ({ data }) => {
|
|
6618
6767
|
const jsonData = {
|
|
6619
6768
|
attachment_ids: [],
|
|
@@ -6629,7 +6778,7 @@ function useFormService() {
|
|
|
6629
6778
|
},
|
|
6630
6779
|
[env]
|
|
6631
6780
|
);
|
|
6632
|
-
const getImage =
|
|
6781
|
+
const getImage = useCallback75(
|
|
6633
6782
|
async ({ data }) => {
|
|
6634
6783
|
return env.requests.get(
|
|
6635
6784
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6642,7 +6791,7 @@ function useFormService() {
|
|
|
6642
6791
|
},
|
|
6643
6792
|
[env]
|
|
6644
6793
|
);
|
|
6645
|
-
const uploadImage =
|
|
6794
|
+
const uploadImage = useCallback75(
|
|
6646
6795
|
async ({
|
|
6647
6796
|
formData,
|
|
6648
6797
|
service,
|
|
@@ -6661,7 +6810,7 @@ function useFormService() {
|
|
|
6661
6810
|
},
|
|
6662
6811
|
[env]
|
|
6663
6812
|
);
|
|
6664
|
-
const uploadFile =
|
|
6813
|
+
const uploadFile = useCallback75(
|
|
6665
6814
|
async ({
|
|
6666
6815
|
formData,
|
|
6667
6816
|
service,
|
|
@@ -6681,7 +6830,7 @@ function useFormService() {
|
|
|
6681
6830
|
},
|
|
6682
6831
|
[env]
|
|
6683
6832
|
);
|
|
6684
|
-
const getFormView =
|
|
6833
|
+
const getFormView = useCallback75(
|
|
6685
6834
|
async ({ data }) => {
|
|
6686
6835
|
const jsonData = {
|
|
6687
6836
|
model: data.model,
|
|
@@ -6697,7 +6846,7 @@ function useFormService() {
|
|
|
6697
6846
|
},
|
|
6698
6847
|
[env]
|
|
6699
6848
|
);
|
|
6700
|
-
const changeStatus =
|
|
6849
|
+
const changeStatus = useCallback75(
|
|
6701
6850
|
async ({ data }) => {
|
|
6702
6851
|
const vals = {
|
|
6703
6852
|
[data.name]: data.stage_id
|
|
@@ -6726,7 +6875,7 @@ function useFormService() {
|
|
|
6726
6875
|
},
|
|
6727
6876
|
[env]
|
|
6728
6877
|
);
|
|
6729
|
-
const getExternalTab =
|
|
6878
|
+
const getExternalTab = useCallback75(
|
|
6730
6879
|
async ({ method, context, service, xNode }) => {
|
|
6731
6880
|
return env?.requests?.post(
|
|
6732
6881
|
"/call" /* CALL_PATH */,
|
|
@@ -6761,10 +6910,10 @@ function useFormService() {
|
|
|
6761
6910
|
}
|
|
6762
6911
|
|
|
6763
6912
|
// src/services/kanban-service/index.ts
|
|
6764
|
-
import { useCallback as
|
|
6913
|
+
import { useCallback as useCallback76 } from "react";
|
|
6765
6914
|
function useKanbanService() {
|
|
6766
6915
|
const { env } = useEnv();
|
|
6767
|
-
const getGroups =
|
|
6916
|
+
const getGroups = useCallback76(
|
|
6768
6917
|
async ({ model, width_context }) => {
|
|
6769
6918
|
const jsonData = {
|
|
6770
6919
|
model,
|
|
@@ -6784,7 +6933,7 @@ function useKanbanService() {
|
|
|
6784
6933
|
},
|
|
6785
6934
|
[env]
|
|
6786
6935
|
);
|
|
6787
|
-
const getProgressBar =
|
|
6936
|
+
const getProgressBar = useCallback76(
|
|
6788
6937
|
async ({ field, color, model, width_context }) => {
|
|
6789
6938
|
const jsonData = {
|
|
6790
6939
|
model,
|
|
@@ -6814,10 +6963,10 @@ function useKanbanService() {
|
|
|
6814
6963
|
}
|
|
6815
6964
|
|
|
6816
6965
|
// src/services/model-service/index.ts
|
|
6817
|
-
import { useCallback as
|
|
6966
|
+
import { useCallback as useCallback77 } from "react";
|
|
6818
6967
|
function useModelService() {
|
|
6819
6968
|
const { env } = useEnv();
|
|
6820
|
-
const getListMyBankAccount =
|
|
6969
|
+
const getListMyBankAccount = useCallback77(
|
|
6821
6970
|
async ({
|
|
6822
6971
|
domain,
|
|
6823
6972
|
spectification,
|
|
@@ -6841,7 +6990,7 @@ function useModelService() {
|
|
|
6841
6990
|
},
|
|
6842
6991
|
[env]
|
|
6843
6992
|
);
|
|
6844
|
-
const getCurrency =
|
|
6993
|
+
const getCurrency = useCallback77(async () => {
|
|
6845
6994
|
const jsonData = {
|
|
6846
6995
|
model: "res.currency",
|
|
6847
6996
|
method: "web_search_read",
|
|
@@ -6861,7 +7010,7 @@ function useModelService() {
|
|
|
6861
7010
|
}
|
|
6862
7011
|
});
|
|
6863
7012
|
}, [env]);
|
|
6864
|
-
const getConversionRate =
|
|
7013
|
+
const getConversionRate = useCallback77(async () => {
|
|
6865
7014
|
const jsonData = {
|
|
6866
7015
|
model: "res.currency",
|
|
6867
7016
|
method: "web_search_read",
|
|
@@ -6887,7 +7036,7 @@ function useModelService() {
|
|
|
6887
7036
|
}
|
|
6888
7037
|
});
|
|
6889
7038
|
}, [env]);
|
|
6890
|
-
const getAll =
|
|
7039
|
+
const getAll = useCallback77(
|
|
6891
7040
|
async ({
|
|
6892
7041
|
data,
|
|
6893
7042
|
service,
|
|
@@ -6929,7 +7078,7 @@ function useModelService() {
|
|
|
6929
7078
|
},
|
|
6930
7079
|
[env]
|
|
6931
7080
|
);
|
|
6932
|
-
const getListCalendar =
|
|
7081
|
+
const getListCalendar = useCallback77(
|
|
6933
7082
|
async ({ data }) => {
|
|
6934
7083
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6935
7084
|
fields: data.fields,
|
|
@@ -6960,7 +7109,7 @@ function useModelService() {
|
|
|
6960
7109
|
},
|
|
6961
7110
|
[env]
|
|
6962
7111
|
);
|
|
6963
|
-
const getList =
|
|
7112
|
+
const getList = useCallback77(
|
|
6964
7113
|
async ({
|
|
6965
7114
|
model,
|
|
6966
7115
|
ids = [],
|
|
@@ -6992,7 +7141,7 @@ function useModelService() {
|
|
|
6992
7141
|
},
|
|
6993
7142
|
[env]
|
|
6994
7143
|
);
|
|
6995
|
-
const getDetail =
|
|
7144
|
+
const getDetail = useCallback77(
|
|
6996
7145
|
async ({
|
|
6997
7146
|
ids = [],
|
|
6998
7147
|
model,
|
|
@@ -7024,7 +7173,7 @@ function useModelService() {
|
|
|
7024
7173
|
},
|
|
7025
7174
|
[env]
|
|
7026
7175
|
);
|
|
7027
|
-
const save =
|
|
7176
|
+
const save = useCallback77(
|
|
7028
7177
|
async ({
|
|
7029
7178
|
model,
|
|
7030
7179
|
ids = [],
|
|
@@ -7059,7 +7208,7 @@ function useModelService() {
|
|
|
7059
7208
|
},
|
|
7060
7209
|
[env]
|
|
7061
7210
|
);
|
|
7062
|
-
const deleteApi =
|
|
7211
|
+
const deleteApi = useCallback77(
|
|
7063
7212
|
async ({ ids = [], model, service }) => {
|
|
7064
7213
|
const jsonData = {
|
|
7065
7214
|
model,
|
|
@@ -7079,7 +7228,7 @@ function useModelService() {
|
|
|
7079
7228
|
},
|
|
7080
7229
|
[env]
|
|
7081
7230
|
);
|
|
7082
|
-
const onChange =
|
|
7231
|
+
const onChange = useCallback77(
|
|
7083
7232
|
async ({
|
|
7084
7233
|
ids = [],
|
|
7085
7234
|
model,
|
|
@@ -7115,7 +7264,7 @@ function useModelService() {
|
|
|
7115
7264
|
},
|
|
7116
7265
|
[env]
|
|
7117
7266
|
);
|
|
7118
|
-
const getListFieldsOnchange =
|
|
7267
|
+
const getListFieldsOnchange = useCallback77(
|
|
7119
7268
|
async ({
|
|
7120
7269
|
model,
|
|
7121
7270
|
service,
|
|
@@ -7139,7 +7288,7 @@ function useModelService() {
|
|
|
7139
7288
|
},
|
|
7140
7289
|
[env]
|
|
7141
7290
|
);
|
|
7142
|
-
const parseORMOdoo =
|
|
7291
|
+
const parseORMOdoo = useCallback77((data) => {
|
|
7143
7292
|
for (const key in data) {
|
|
7144
7293
|
if (key === "display_name") {
|
|
7145
7294
|
delete data[key];
|
|
@@ -7150,7 +7299,7 @@ function useModelService() {
|
|
|
7150
7299
|
}
|
|
7151
7300
|
return { ...data };
|
|
7152
7301
|
}, []);
|
|
7153
|
-
const toDataJS =
|
|
7302
|
+
const toDataJS = useCallback77(
|
|
7154
7303
|
(data, viewData, model) => {
|
|
7155
7304
|
for (const key in data) {
|
|
7156
7305
|
if (data[key] === false) {
|
|
@@ -7208,10 +7357,10 @@ function useModelService() {
|
|
|
7208
7357
|
}
|
|
7209
7358
|
|
|
7210
7359
|
// src/services/user-service/index.ts
|
|
7211
|
-
import { useCallback as
|
|
7360
|
+
import { useCallback as useCallback78 } from "react";
|
|
7212
7361
|
function useUserService() {
|
|
7213
7362
|
const { env } = useEnv();
|
|
7214
|
-
const getProfile =
|
|
7363
|
+
const getProfile = useCallback78(
|
|
7215
7364
|
async (service, path, extraHeaders) => {
|
|
7216
7365
|
return env?.requests?.get(
|
|
7217
7366
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -7228,7 +7377,7 @@ function useUserService() {
|
|
|
7228
7377
|
},
|
|
7229
7378
|
[env]
|
|
7230
7379
|
);
|
|
7231
|
-
const getUser =
|
|
7380
|
+
const getUser = useCallback78(
|
|
7232
7381
|
async ({ context, id }) => {
|
|
7233
7382
|
const jsonData = {
|
|
7234
7383
|
model: "res.users",
|
|
@@ -7266,7 +7415,7 @@ function useUserService() {
|
|
|
7266
7415
|
},
|
|
7267
7416
|
[env]
|
|
7268
7417
|
);
|
|
7269
|
-
const switchUserLocale =
|
|
7418
|
+
const switchUserLocale = useCallback78(
|
|
7270
7419
|
async ({ id, values, service }) => {
|
|
7271
7420
|
const jsonData = {
|
|
7272
7421
|
model: "res.users",
|
|
@@ -7294,10 +7443,10 @@ function useUserService() {
|
|
|
7294
7443
|
}
|
|
7295
7444
|
|
|
7296
7445
|
// src/services/view-service/index.ts
|
|
7297
|
-
import { useCallback as
|
|
7446
|
+
import { useCallback as useCallback79 } from "react";
|
|
7298
7447
|
function useViewService() {
|
|
7299
7448
|
const { env } = useEnv();
|
|
7300
|
-
const getView =
|
|
7449
|
+
const getView = useCallback79(
|
|
7301
7450
|
async ({
|
|
7302
7451
|
model,
|
|
7303
7452
|
views,
|
|
@@ -7337,7 +7486,7 @@ function useViewService() {
|
|
|
7337
7486
|
},
|
|
7338
7487
|
[env]
|
|
7339
7488
|
);
|
|
7340
|
-
const getMenu =
|
|
7489
|
+
const getMenu = useCallback79(
|
|
7341
7490
|
async (context, specification, domain, service) => {
|
|
7342
7491
|
const jsonData = {
|
|
7343
7492
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -7368,7 +7517,7 @@ function useViewService() {
|
|
|
7368
7517
|
},
|
|
7369
7518
|
[env]
|
|
7370
7519
|
);
|
|
7371
|
-
const getActionDetail =
|
|
7520
|
+
const getActionDetail = useCallback79(
|
|
7372
7521
|
async (aid, context) => {
|
|
7373
7522
|
const jsonData = {
|
|
7374
7523
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7398,7 +7547,7 @@ function useViewService() {
|
|
|
7398
7547
|
},
|
|
7399
7548
|
[env]
|
|
7400
7549
|
);
|
|
7401
|
-
const getResequence =
|
|
7550
|
+
const getResequence = useCallback79(
|
|
7402
7551
|
async ({
|
|
7403
7552
|
model,
|
|
7404
7553
|
ids,
|
|
@@ -7428,7 +7577,7 @@ function useViewService() {
|
|
|
7428
7577
|
},
|
|
7429
7578
|
[env]
|
|
7430
7579
|
);
|
|
7431
|
-
const getSelectionItem =
|
|
7580
|
+
const getSelectionItem = useCallback79(
|
|
7432
7581
|
async ({
|
|
7433
7582
|
data,
|
|
7434
7583
|
service,
|
|
@@ -7465,7 +7614,7 @@ function useViewService() {
|
|
|
7465
7614
|
},
|
|
7466
7615
|
[env]
|
|
7467
7616
|
);
|
|
7468
|
-
const loadMessages =
|
|
7617
|
+
const loadMessages = useCallback79(async () => {
|
|
7469
7618
|
return env.requests.post(
|
|
7470
7619
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7471
7620
|
{},
|
|
@@ -7476,14 +7625,14 @@ function useViewService() {
|
|
|
7476
7625
|
}
|
|
7477
7626
|
);
|
|
7478
7627
|
}, [env]);
|
|
7479
|
-
const getVersion =
|
|
7628
|
+
const getVersion = useCallback79(async () => {
|
|
7480
7629
|
return env?.requests?.get("", {
|
|
7481
7630
|
headers: {
|
|
7482
7631
|
"Content-Type": "application/json"
|
|
7483
7632
|
}
|
|
7484
7633
|
});
|
|
7485
7634
|
}, [env]);
|
|
7486
|
-
const grantAccess =
|
|
7635
|
+
const grantAccess = useCallback79(
|
|
7487
7636
|
async ({
|
|
7488
7637
|
redirect_uri,
|
|
7489
7638
|
state,
|
|
@@ -7510,7 +7659,7 @@ function useViewService() {
|
|
|
7510
7659
|
},
|
|
7511
7660
|
[env]
|
|
7512
7661
|
);
|
|
7513
|
-
const removeTotpSetUp =
|
|
7662
|
+
const removeTotpSetUp = useCallback79(
|
|
7514
7663
|
async ({ method, token }) => {
|
|
7515
7664
|
const jsonData = {
|
|
7516
7665
|
method,
|
|
@@ -7531,7 +7680,7 @@ function useViewService() {
|
|
|
7531
7680
|
},
|
|
7532
7681
|
[env]
|
|
7533
7682
|
);
|
|
7534
|
-
const requestSetupTotp =
|
|
7683
|
+
const requestSetupTotp = useCallback79(
|
|
7535
7684
|
async ({ method, token }) => {
|
|
7536
7685
|
const jsonData = {
|
|
7537
7686
|
method,
|
|
@@ -7550,7 +7699,7 @@ function useViewService() {
|
|
|
7550
7699
|
},
|
|
7551
7700
|
[env]
|
|
7552
7701
|
);
|
|
7553
|
-
const settingsWebRead2fa =
|
|
7702
|
+
const settingsWebRead2fa = useCallback79(
|
|
7554
7703
|
async ({
|
|
7555
7704
|
method,
|
|
7556
7705
|
model,
|
|
@@ -7578,7 +7727,7 @@ function useViewService() {
|
|
|
7578
7727
|
},
|
|
7579
7728
|
[env]
|
|
7580
7729
|
);
|
|
7581
|
-
const signInSSO =
|
|
7730
|
+
const signInSSO = useCallback79(
|
|
7582
7731
|
async ({
|
|
7583
7732
|
redirect_uri,
|
|
7584
7733
|
state,
|
|
@@ -7610,7 +7759,7 @@ function useViewService() {
|
|
|
7610
7759
|
},
|
|
7611
7760
|
[env]
|
|
7612
7761
|
);
|
|
7613
|
-
const verify2FA =
|
|
7762
|
+
const verify2FA = useCallback79(
|
|
7614
7763
|
({
|
|
7615
7764
|
method,
|
|
7616
7765
|
with_context,
|
|
@@ -7643,7 +7792,7 @@ function useViewService() {
|
|
|
7643
7792
|
},
|
|
7644
7793
|
[env]
|
|
7645
7794
|
);
|
|
7646
|
-
const get2FAMethods =
|
|
7795
|
+
const get2FAMethods = useCallback79(
|
|
7647
7796
|
({ method, with_context }) => {
|
|
7648
7797
|
const jsonData = {
|
|
7649
7798
|
method,
|
|
@@ -7662,7 +7811,7 @@ function useViewService() {
|
|
|
7662
7811
|
},
|
|
7663
7812
|
[env]
|
|
7664
7813
|
);
|
|
7665
|
-
const verifyTotp =
|
|
7814
|
+
const verifyTotp = useCallback79(
|
|
7666
7815
|
({
|
|
7667
7816
|
method,
|
|
7668
7817
|
action_token,
|
|
@@ -7687,7 +7836,7 @@ function useViewService() {
|
|
|
7687
7836
|
},
|
|
7688
7837
|
[env]
|
|
7689
7838
|
);
|
|
7690
|
-
const getNotifications =
|
|
7839
|
+
const getNotifications = useCallback79(
|
|
7691
7840
|
async ({
|
|
7692
7841
|
service,
|
|
7693
7842
|
xNode,
|
|
@@ -7707,7 +7856,7 @@ function useViewService() {
|
|
|
7707
7856
|
},
|
|
7708
7857
|
[env]
|
|
7709
7858
|
);
|
|
7710
|
-
const getCountry =
|
|
7859
|
+
const getCountry = useCallback79(
|
|
7711
7860
|
async ({
|
|
7712
7861
|
service,
|
|
7713
7862
|
xNode,
|
|
@@ -7734,7 +7883,7 @@ function useViewService() {
|
|
|
7734
7883
|
},
|
|
7735
7884
|
[env]
|
|
7736
7885
|
);
|
|
7737
|
-
const getCity =
|
|
7886
|
+
const getCity = useCallback79(
|
|
7738
7887
|
async ({
|
|
7739
7888
|
service,
|
|
7740
7889
|
xNode,
|
|
@@ -7761,7 +7910,7 @@ function useViewService() {
|
|
|
7761
7910
|
},
|
|
7762
7911
|
[env]
|
|
7763
7912
|
);
|
|
7764
|
-
const getWard =
|
|
7913
|
+
const getWard = useCallback79(
|
|
7765
7914
|
async ({
|
|
7766
7915
|
service,
|
|
7767
7916
|
xNode,
|
|
@@ -7786,7 +7935,7 @@ function useViewService() {
|
|
|
7786
7935
|
},
|
|
7787
7936
|
[env]
|
|
7788
7937
|
);
|
|
7789
|
-
const getPartnerTitle =
|
|
7938
|
+
const getPartnerTitle = useCallback79(
|
|
7790
7939
|
async ({
|
|
7791
7940
|
service,
|
|
7792
7941
|
xNode,
|
|
@@ -7838,10 +7987,10 @@ function useViewService() {
|
|
|
7838
7987
|
}
|
|
7839
7988
|
|
|
7840
7989
|
// src/services/dashboard-service/index.ts
|
|
7841
|
-
import { useCallback as
|
|
7990
|
+
import { useCallback as useCallback80 } from "react";
|
|
7842
7991
|
function useDashboardService() {
|
|
7843
7992
|
const { env } = useEnv();
|
|
7844
|
-
const readGroup =
|
|
7993
|
+
const readGroup = useCallback80(
|
|
7845
7994
|
async ({
|
|
7846
7995
|
service,
|
|
7847
7996
|
xNode,
|
|
@@ -7858,7 +8007,7 @@ function useDashboardService() {
|
|
|
7858
8007
|
},
|
|
7859
8008
|
[env]
|
|
7860
8009
|
);
|
|
7861
|
-
const getDataChart =
|
|
8010
|
+
const getDataChart = useCallback80(
|
|
7862
8011
|
async ({
|
|
7863
8012
|
service,
|
|
7864
8013
|
xNode,
|