@fctc/interface-logic 5.0.7 → 5.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.mts +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 +35 -1
- package/dist/hooks.d.ts +35 -1
- package/dist/hooks.js +358 -131
- package/dist/hooks.mjs +353 -131
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +366 -131
- package/dist/index.mjs +361 -131
- package/dist/provider.d.mts +6 -1
- package/dist/provider.d.ts +6 -1
- package/dist/provider.js +374 -152
- package/dist/provider.mjs +363 -141
- package/dist/services.d.mts +34 -0
- package/dist/services.d.ts +34 -0
- package/dist/services.js +377 -195
- package/dist/services.mjs +374 -192
- 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 useCallback72 } 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");
|
|
@@ -5435,6 +5568,35 @@ var deleteProductSupabaseService = () => {
|
|
|
5435
5568
|
};
|
|
5436
5569
|
};
|
|
5437
5570
|
|
|
5571
|
+
// src/services/pos-service/supabase/toggle-pos-restaurant.ts
|
|
5572
|
+
import { useCallback as useCallback71 } from "react";
|
|
5573
|
+
var togglePosRestaurantSupabaseService = () => {
|
|
5574
|
+
const supabase = useSupabaseOptional();
|
|
5575
|
+
const togglePosRestaurantSupabase = useCallback71(
|
|
5576
|
+
async (values) => {
|
|
5577
|
+
if (!supabase) {
|
|
5578
|
+
console.error("Supabase client not initialized");
|
|
5579
|
+
return null;
|
|
5580
|
+
}
|
|
5581
|
+
try {
|
|
5582
|
+
const { data, error } = await supabase.from("pos_configs" /* POS_CONFIGS */).update({ module_pos_restaurant: values.module_pos_restaurant }).eq("id", values.config_id).select("id").single();
|
|
5583
|
+
if (error) {
|
|
5584
|
+
console.error("Error toggling pos restaurant mode:", error);
|
|
5585
|
+
return null;
|
|
5586
|
+
}
|
|
5587
|
+
return [data.id];
|
|
5588
|
+
} catch (error) {
|
|
5589
|
+
console.error("Error toggling pos restaurant mode:", error);
|
|
5590
|
+
return null;
|
|
5591
|
+
}
|
|
5592
|
+
},
|
|
5593
|
+
[supabase]
|
|
5594
|
+
);
|
|
5595
|
+
return {
|
|
5596
|
+
togglePosRestaurantSupabase
|
|
5597
|
+
};
|
|
5598
|
+
};
|
|
5599
|
+
|
|
5438
5600
|
// src/services/pos-service/index.ts
|
|
5439
5601
|
var serviceFactories = [
|
|
5440
5602
|
addEntityService,
|
|
@@ -5467,6 +5629,10 @@ var serviceFactories = [
|
|
|
5467
5629
|
updateEntityService,
|
|
5468
5630
|
updateOrderStatusService,
|
|
5469
5631
|
completeCurrentStageService,
|
|
5632
|
+
appAuthenticateService,
|
|
5633
|
+
applyVoucherService,
|
|
5634
|
+
removeVoucherService,
|
|
5635
|
+
syncFromUiService,
|
|
5470
5636
|
addFloorSupabaseService,
|
|
5471
5637
|
addTableSupabaseService,
|
|
5472
5638
|
updateFloorSupabaseService,
|
|
@@ -5500,7 +5666,8 @@ var serviceFactories = [
|
|
|
5500
5666
|
updateCategorySupabaseService,
|
|
5501
5667
|
deleteCategorySupabaseService,
|
|
5502
5668
|
updateProductSupabaseService,
|
|
5503
|
-
deleteProductSupabaseService
|
|
5669
|
+
deleteProductSupabaseService,
|
|
5670
|
+
togglePosRestaurantSupabaseService
|
|
5504
5671
|
];
|
|
5505
5672
|
var usePosService = () => {
|
|
5506
5673
|
const { env } = useEnv();
|
|
@@ -5620,99 +5787,114 @@ import { useMutation as useMutation87 } from "@tanstack/react-query";
|
|
|
5620
5787
|
// src/hooks/pos/use-complete-current-stage.ts
|
|
5621
5788
|
import { useMutation as useMutation88 } from "@tanstack/react-query";
|
|
5622
5789
|
|
|
5623
|
-
// src/hooks/pos/
|
|
5790
|
+
// src/hooks/pos/use-app-authenticate.ts
|
|
5624
5791
|
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
5625
5792
|
|
|
5626
|
-
// src/hooks/pos/
|
|
5793
|
+
// src/hooks/pos/use-apply-voucher.ts
|
|
5627
5794
|
import { useMutation as useMutation90 } from "@tanstack/react-query";
|
|
5628
5795
|
|
|
5629
|
-
// src/hooks/pos/
|
|
5796
|
+
// src/hooks/pos/use-remove-voucher.ts
|
|
5630
5797
|
import { useMutation as useMutation91 } from "@tanstack/react-query";
|
|
5631
5798
|
|
|
5632
|
-
// src/hooks/pos/
|
|
5799
|
+
// src/hooks/pos/use-sync-from-ui.ts
|
|
5633
5800
|
import { useMutation as useMutation92 } from "@tanstack/react-query";
|
|
5634
5801
|
|
|
5635
|
-
// src/hooks/pos/supabase/use-
|
|
5802
|
+
// src/hooks/pos/supabase/use-add-floor.ts
|
|
5636
5803
|
import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
5637
5804
|
|
|
5638
|
-
// src/hooks/pos/supabase/use-
|
|
5805
|
+
// src/hooks/pos/supabase/use-add-table.ts
|
|
5639
5806
|
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
5640
5807
|
|
|
5641
|
-
// src/hooks/pos/supabase/use-
|
|
5808
|
+
// src/hooks/pos/supabase/use-update-floor.ts
|
|
5642
5809
|
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
5643
5810
|
|
|
5644
|
-
// src/hooks/pos/supabase/use-
|
|
5811
|
+
// src/hooks/pos/supabase/use-update-table.ts
|
|
5645
5812
|
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
5646
5813
|
|
|
5647
|
-
// src/hooks/pos/supabase/use-
|
|
5814
|
+
// src/hooks/pos/supabase/use-delete-floor.ts
|
|
5648
5815
|
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
5649
5816
|
|
|
5650
|
-
// src/hooks/pos/supabase/use-
|
|
5817
|
+
// src/hooks/pos/supabase/use-delete-table.ts
|
|
5651
5818
|
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
5652
5819
|
|
|
5653
|
-
// src/hooks/pos/supabase/use-
|
|
5820
|
+
// src/hooks/pos/supabase/use-create-order.ts
|
|
5654
5821
|
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
5655
5822
|
|
|
5656
|
-
// src/hooks/pos/supabase/use-
|
|
5823
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
5657
5824
|
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
5658
5825
|
|
|
5659
|
-
// src/hooks/pos/supabase/use-
|
|
5826
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
5660
5827
|
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
5661
5828
|
|
|
5662
|
-
// src/hooks/pos/supabase/use-
|
|
5829
|
+
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
5663
5830
|
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
5664
5831
|
|
|
5665
|
-
// src/hooks/pos/supabase/use-
|
|
5832
|
+
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
5666
5833
|
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
5667
5834
|
|
|
5668
|
-
// src/hooks/pos/use-
|
|
5835
|
+
// src/hooks/pos/supabase/use-update-order.ts
|
|
5669
5836
|
import { useMutation as useMutation104 } from "@tanstack/react-query";
|
|
5670
5837
|
|
|
5671
|
-
// src/hooks/pos/supabase/use-
|
|
5838
|
+
// src/hooks/pos/supabase/use-delete-order.ts
|
|
5672
5839
|
import { useMutation as useMutation105 } from "@tanstack/react-query";
|
|
5673
5840
|
|
|
5674
|
-
// src/hooks/pos/supabase/use-
|
|
5841
|
+
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
5675
5842
|
import { useMutation as useMutation106 } from "@tanstack/react-query";
|
|
5676
5843
|
|
|
5677
|
-
// src/hooks/pos/supabase/use-
|
|
5844
|
+
// src/hooks/pos/supabase/use-add-product.ts
|
|
5678
5845
|
import { useMutation as useMutation107 } from "@tanstack/react-query";
|
|
5679
5846
|
|
|
5680
|
-
// src/hooks/pos/
|
|
5847
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
5681
5848
|
import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
5682
5849
|
|
|
5683
|
-
// src/hooks/pos/supabase/use-
|
|
5850
|
+
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
5684
5851
|
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
5685
5852
|
|
|
5686
|
-
// src/hooks/pos/supabase/use-
|
|
5853
|
+
// src/hooks/pos/supabase/use-update-session-payment-methods.ts
|
|
5687
5854
|
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
5688
5855
|
|
|
5689
|
-
// src/hooks/pos/supabase/use-
|
|
5856
|
+
// src/hooks/pos/supabase/use-create-payment.ts
|
|
5690
5857
|
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
5691
5858
|
|
|
5692
|
-
// src/hooks/pos/supabase/use-
|
|
5859
|
+
// src/hooks/pos/supabase/use-create-customer.ts
|
|
5693
5860
|
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
5694
5861
|
|
|
5695
|
-
// src/hooks/pos/supabase/use-
|
|
5862
|
+
// src/hooks/pos/supabase/use-update-customer.ts
|
|
5696
5863
|
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
5697
5864
|
|
|
5698
|
-
// src/hooks/pos/supabase/use-
|
|
5865
|
+
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
5699
5866
|
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
5700
5867
|
|
|
5701
|
-
// src/hooks/pos/supabase/use-
|
|
5868
|
+
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
5702
5869
|
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
5703
5870
|
|
|
5704
|
-
// src/hooks/pos/supabase/use-
|
|
5871
|
+
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
5705
5872
|
import { useMutation as useMutation116 } from "@tanstack/react-query";
|
|
5706
5873
|
|
|
5707
|
-
// src/hooks/pos/supabase/use-
|
|
5874
|
+
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
5708
5875
|
import { useMutation as useMutation117 } from "@tanstack/react-query";
|
|
5709
5876
|
|
|
5710
|
-
// src/hooks/pos/supabase/use-
|
|
5877
|
+
// src/hooks/pos/supabase/use-assign-role.ts
|
|
5711
5878
|
import { useMutation as useMutation118 } from "@tanstack/react-query";
|
|
5712
5879
|
|
|
5713
|
-
// src/hooks/pos/supabase/use-
|
|
5880
|
+
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
5714
5881
|
import { useMutation as useMutation119 } from "@tanstack/react-query";
|
|
5715
5882
|
|
|
5883
|
+
// src/hooks/pos/supabase/use-update-category.ts
|
|
5884
|
+
import { useMutation as useMutation120 } from "@tanstack/react-query";
|
|
5885
|
+
|
|
5886
|
+
// src/hooks/pos/supabase/use-delete-category.ts
|
|
5887
|
+
import { useMutation as useMutation121 } from "@tanstack/react-query";
|
|
5888
|
+
|
|
5889
|
+
// src/hooks/pos/supabase/use-update-product.ts
|
|
5890
|
+
import { useMutation as useMutation122 } from "@tanstack/react-query";
|
|
5891
|
+
|
|
5892
|
+
// src/hooks/pos/supabase/use-delete-product.ts
|
|
5893
|
+
import { useMutation as useMutation123 } from "@tanstack/react-query";
|
|
5894
|
+
|
|
5895
|
+
// src/hooks/pos/supabase/use-toggle-pos-restaurant.ts
|
|
5896
|
+
import { useMutation as useMutation124 } from "@tanstack/react-query";
|
|
5897
|
+
|
|
5716
5898
|
// src/provider/service-provider.tsx
|
|
5717
5899
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5718
5900
|
var ServiceContext = createContext3(null);
|
|
@@ -5724,7 +5906,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5724
5906
|
// src/services/action-service/index.ts
|
|
5725
5907
|
function useActionService() {
|
|
5726
5908
|
const { env } = useEnv();
|
|
5727
|
-
const loadAction =
|
|
5909
|
+
const loadAction = useCallback72(
|
|
5728
5910
|
async ({
|
|
5729
5911
|
idAction,
|
|
5730
5912
|
context,
|
|
@@ -5748,7 +5930,7 @@ function useActionService() {
|
|
|
5748
5930
|
},
|
|
5749
5931
|
[env]
|
|
5750
5932
|
);
|
|
5751
|
-
const callButton =
|
|
5933
|
+
const callButton = useCallback72(
|
|
5752
5934
|
async ({
|
|
5753
5935
|
model,
|
|
5754
5936
|
ids = [],
|
|
@@ -5782,7 +5964,7 @@ function useActionService() {
|
|
|
5782
5964
|
},
|
|
5783
5965
|
[env]
|
|
5784
5966
|
);
|
|
5785
|
-
const removeRows =
|
|
5967
|
+
const removeRows = useCallback72(
|
|
5786
5968
|
async ({
|
|
5787
5969
|
model,
|
|
5788
5970
|
ids,
|
|
@@ -5808,7 +5990,7 @@ function useActionService() {
|
|
|
5808
5990
|
},
|
|
5809
5991
|
[env]
|
|
5810
5992
|
);
|
|
5811
|
-
const duplicateRecord =
|
|
5993
|
+
const duplicateRecord = useCallback72(
|
|
5812
5994
|
async ({
|
|
5813
5995
|
model,
|
|
5814
5996
|
id,
|
|
@@ -5834,7 +6016,7 @@ function useActionService() {
|
|
|
5834
6016
|
},
|
|
5835
6017
|
[env]
|
|
5836
6018
|
);
|
|
5837
|
-
const getPrintReportName =
|
|
6019
|
+
const getPrintReportName = useCallback72(
|
|
5838
6020
|
async ({ id }) => {
|
|
5839
6021
|
const jsonData = {
|
|
5840
6022
|
model: "ir.actions.report",
|
|
@@ -5852,7 +6034,7 @@ function useActionService() {
|
|
|
5852
6034
|
},
|
|
5853
6035
|
[env]
|
|
5854
6036
|
);
|
|
5855
|
-
const print =
|
|
6037
|
+
const print = useCallback72(
|
|
5856
6038
|
async ({ id, report, db }) => {
|
|
5857
6039
|
const jsonData = {
|
|
5858
6040
|
report,
|
|
@@ -5870,7 +6052,7 @@ function useActionService() {
|
|
|
5870
6052
|
},
|
|
5871
6053
|
[env]
|
|
5872
6054
|
);
|
|
5873
|
-
const runAction =
|
|
6055
|
+
const runAction = useCallback72(
|
|
5874
6056
|
async ({
|
|
5875
6057
|
idAction,
|
|
5876
6058
|
context,
|
|
@@ -5897,7 +6079,7 @@ function useActionService() {
|
|
|
5897
6079
|
},
|
|
5898
6080
|
[env]
|
|
5899
6081
|
);
|
|
5900
|
-
const generateSerialNumber =
|
|
6082
|
+
const generateSerialNumber = useCallback72(
|
|
5901
6083
|
async ({
|
|
5902
6084
|
kwargs,
|
|
5903
6085
|
context,
|
|
@@ -5922,7 +6104,7 @@ function useActionService() {
|
|
|
5922
6104
|
},
|
|
5923
6105
|
[env]
|
|
5924
6106
|
);
|
|
5925
|
-
const actionServerHome =
|
|
6107
|
+
const actionServerHome = useCallback72(async () => {
|
|
5926
6108
|
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
5927
6109
|
}, [env]);
|
|
5928
6110
|
return {
|
|
@@ -5939,11 +6121,11 @@ function useActionService() {
|
|
|
5939
6121
|
}
|
|
5940
6122
|
|
|
5941
6123
|
// src/services/auth-service/index.ts
|
|
5942
|
-
import { useCallback as
|
|
6124
|
+
import { useCallback as useCallback73 } from "react";
|
|
5943
6125
|
function useAuthService() {
|
|
5944
6126
|
const { env } = useEnv();
|
|
5945
6127
|
const supabase = useSupabaseOptional();
|
|
5946
|
-
const login =
|
|
6128
|
+
const login = useCallback73(
|
|
5947
6129
|
async (body) => {
|
|
5948
6130
|
const payload = Object.fromEntries(
|
|
5949
6131
|
Object.entries({
|
|
@@ -5968,7 +6150,7 @@ function useAuthService() {
|
|
|
5968
6150
|
},
|
|
5969
6151
|
[env]
|
|
5970
6152
|
);
|
|
5971
|
-
const loginTenantUser =
|
|
6153
|
+
const loginTenantUser = useCallback73(
|
|
5972
6154
|
async (body) => {
|
|
5973
6155
|
const payload = {
|
|
5974
6156
|
email: body.email,
|
|
@@ -5983,7 +6165,7 @@ function useAuthService() {
|
|
|
5983
6165
|
},
|
|
5984
6166
|
[env]
|
|
5985
6167
|
);
|
|
5986
|
-
const forgotPassword =
|
|
6168
|
+
const forgotPassword = useCallback73(
|
|
5987
6169
|
async (email) => {
|
|
5988
6170
|
const bodyData = {
|
|
5989
6171
|
login: email,
|
|
@@ -5997,7 +6179,7 @@ function useAuthService() {
|
|
|
5997
6179
|
},
|
|
5998
6180
|
[env]
|
|
5999
6181
|
);
|
|
6000
|
-
const forgotPasswordSSO =
|
|
6182
|
+
const forgotPasswordSSO = useCallback73(
|
|
6001
6183
|
async ({
|
|
6002
6184
|
email,
|
|
6003
6185
|
with_context,
|
|
@@ -6020,7 +6202,7 @@ function useAuthService() {
|
|
|
6020
6202
|
},
|
|
6021
6203
|
[env]
|
|
6022
6204
|
);
|
|
6023
|
-
const resetPassword =
|
|
6205
|
+
const resetPassword = useCallback73(
|
|
6024
6206
|
async (data, token) => {
|
|
6025
6207
|
const bodyData = {
|
|
6026
6208
|
token,
|
|
@@ -6035,7 +6217,7 @@ function useAuthService() {
|
|
|
6035
6217
|
},
|
|
6036
6218
|
[env]
|
|
6037
6219
|
);
|
|
6038
|
-
const resetPasswordSSO =
|
|
6220
|
+
const resetPasswordSSO = useCallback73(
|
|
6039
6221
|
async ({
|
|
6040
6222
|
method,
|
|
6041
6223
|
password,
|
|
@@ -6058,7 +6240,7 @@ function useAuthService() {
|
|
|
6058
6240
|
},
|
|
6059
6241
|
[env]
|
|
6060
6242
|
);
|
|
6061
|
-
const updatePassword =
|
|
6243
|
+
const updatePassword = useCallback73(
|
|
6062
6244
|
async (data, token) => {
|
|
6063
6245
|
const bodyData = {
|
|
6064
6246
|
token,
|
|
@@ -6073,7 +6255,7 @@ function useAuthService() {
|
|
|
6073
6255
|
},
|
|
6074
6256
|
[env]
|
|
6075
6257
|
);
|
|
6076
|
-
const isValidToken =
|
|
6258
|
+
const isValidToken = useCallback73(
|
|
6077
6259
|
async (token) => {
|
|
6078
6260
|
const bodyData = {
|
|
6079
6261
|
token
|
|
@@ -6086,7 +6268,7 @@ function useAuthService() {
|
|
|
6086
6268
|
},
|
|
6087
6269
|
[env]
|
|
6088
6270
|
);
|
|
6089
|
-
const isValidActionToken =
|
|
6271
|
+
const isValidActionToken = useCallback73(
|
|
6090
6272
|
async (actionToken) => {
|
|
6091
6273
|
const bodyData = {};
|
|
6092
6274
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -6099,7 +6281,7 @@ function useAuthService() {
|
|
|
6099
6281
|
},
|
|
6100
6282
|
[env]
|
|
6101
6283
|
);
|
|
6102
|
-
const loginSocial =
|
|
6284
|
+
const loginSocial = useCallback73(
|
|
6103
6285
|
async ({
|
|
6104
6286
|
db,
|
|
6105
6287
|
state,
|
|
@@ -6117,13 +6299,13 @@ function useAuthService() {
|
|
|
6117
6299
|
},
|
|
6118
6300
|
[env]
|
|
6119
6301
|
);
|
|
6120
|
-
const getProviders =
|
|
6302
|
+
const getProviders = useCallback73(
|
|
6121
6303
|
async (db) => {
|
|
6122
6304
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
6123
6305
|
},
|
|
6124
6306
|
[env]
|
|
6125
6307
|
);
|
|
6126
|
-
const getAccessByCode =
|
|
6308
|
+
const getAccessByCode = useCallback73(
|
|
6127
6309
|
async (code) => {
|
|
6128
6310
|
const data = new URLSearchParams();
|
|
6129
6311
|
data.append("code", code);
|
|
@@ -6143,7 +6325,7 @@ function useAuthService() {
|
|
|
6143
6325
|
},
|
|
6144
6326
|
[env]
|
|
6145
6327
|
);
|
|
6146
|
-
const logout =
|
|
6328
|
+
const logout = useCallback73(
|
|
6147
6329
|
async (service) => {
|
|
6148
6330
|
return env?.requests?.post(
|
|
6149
6331
|
"/logout" /* LOGOUT */,
|
|
@@ -6160,7 +6342,7 @@ function useAuthService() {
|
|
|
6160
6342
|
},
|
|
6161
6343
|
[env]
|
|
6162
6344
|
);
|
|
6163
|
-
const getTenantMapping =
|
|
6345
|
+
const getTenantMapping = useCallback73(
|
|
6164
6346
|
async ({ shortName, service }) => {
|
|
6165
6347
|
const bodyData = {
|
|
6166
6348
|
short_name: shortName
|
|
@@ -6178,7 +6360,7 @@ function useAuthService() {
|
|
|
6178
6360
|
},
|
|
6179
6361
|
[env]
|
|
6180
6362
|
);
|
|
6181
|
-
const getToken =
|
|
6363
|
+
const getToken = useCallback73(
|
|
6182
6364
|
async ({
|
|
6183
6365
|
phone,
|
|
6184
6366
|
name,
|
|
@@ -6223,10 +6405,10 @@ function useAuthService() {
|
|
|
6223
6405
|
}
|
|
6224
6406
|
|
|
6225
6407
|
// src/services/company-service/index.ts
|
|
6226
|
-
import { useCallback as
|
|
6408
|
+
import { useCallback as useCallback74 } from "react";
|
|
6227
6409
|
function useCompanyService() {
|
|
6228
6410
|
const { env } = useEnv();
|
|
6229
|
-
const getCurrentCompany =
|
|
6411
|
+
const getCurrentCompany = useCallback74(
|
|
6230
6412
|
async (service, extraHeaders) => {
|
|
6231
6413
|
return await env.requests.get(
|
|
6232
6414
|
"/company" /* COMPANY_PATH */,
|
|
@@ -6243,7 +6425,7 @@ function useCompanyService() {
|
|
|
6243
6425
|
},
|
|
6244
6426
|
[env]
|
|
6245
6427
|
);
|
|
6246
|
-
const getInfoCompany =
|
|
6428
|
+
const getInfoCompany = useCallback74(
|
|
6247
6429
|
async (id, service) => {
|
|
6248
6430
|
const jsonData = {
|
|
6249
6431
|
ids: [id],
|
|
@@ -6279,10 +6461,10 @@ function useCompanyService() {
|
|
|
6279
6461
|
}
|
|
6280
6462
|
|
|
6281
6463
|
// src/services/excel-service/index.ts
|
|
6282
|
-
import { useCallback as
|
|
6464
|
+
import { useCallback as useCallback75 } from "react";
|
|
6283
6465
|
function useExcelService() {
|
|
6284
6466
|
const { env } = useEnv();
|
|
6285
|
-
const uploadFileExcel =
|
|
6467
|
+
const uploadFileExcel = useCallback75(
|
|
6286
6468
|
async ({
|
|
6287
6469
|
formData,
|
|
6288
6470
|
service,
|
|
@@ -6299,7 +6481,7 @@ function useExcelService() {
|
|
|
6299
6481
|
},
|
|
6300
6482
|
[env]
|
|
6301
6483
|
);
|
|
6302
|
-
const uploadIdFile =
|
|
6484
|
+
const uploadIdFile = useCallback75(
|
|
6303
6485
|
async ({
|
|
6304
6486
|
formData,
|
|
6305
6487
|
service,
|
|
@@ -6316,7 +6498,7 @@ function useExcelService() {
|
|
|
6316
6498
|
},
|
|
6317
6499
|
[env]
|
|
6318
6500
|
);
|
|
6319
|
-
const parsePreview =
|
|
6501
|
+
const parsePreview = useCallback75(
|
|
6320
6502
|
async ({
|
|
6321
6503
|
id,
|
|
6322
6504
|
selectedSheet,
|
|
@@ -6365,7 +6547,7 @@ function useExcelService() {
|
|
|
6365
6547
|
},
|
|
6366
6548
|
[env]
|
|
6367
6549
|
);
|
|
6368
|
-
const executeImport =
|
|
6550
|
+
const executeImport = useCallback75(
|
|
6369
6551
|
async ({
|
|
6370
6552
|
columns,
|
|
6371
6553
|
fields,
|
|
@@ -6399,7 +6581,7 @@ function useExcelService() {
|
|
|
6399
6581
|
},
|
|
6400
6582
|
[env]
|
|
6401
6583
|
);
|
|
6402
|
-
const getFileExcel =
|
|
6584
|
+
const getFileExcel = useCallback75(
|
|
6403
6585
|
async ({
|
|
6404
6586
|
model,
|
|
6405
6587
|
service,
|
|
@@ -6423,7 +6605,7 @@ function useExcelService() {
|
|
|
6423
6605
|
},
|
|
6424
6606
|
[env]
|
|
6425
6607
|
);
|
|
6426
|
-
const getFieldExport =
|
|
6608
|
+
const getFieldExport = useCallback75(
|
|
6427
6609
|
async ({
|
|
6428
6610
|
ids,
|
|
6429
6611
|
model,
|
|
@@ -6463,7 +6645,7 @@ function useExcelService() {
|
|
|
6463
6645
|
},
|
|
6464
6646
|
[env]
|
|
6465
6647
|
);
|
|
6466
|
-
const exportExcel =
|
|
6648
|
+
const exportExcel = useCallback75(
|
|
6467
6649
|
async ({
|
|
6468
6650
|
model,
|
|
6469
6651
|
domain,
|
|
@@ -6511,10 +6693,10 @@ function useExcelService() {
|
|
|
6511
6693
|
}
|
|
6512
6694
|
|
|
6513
6695
|
// src/services/form-service/index.ts
|
|
6514
|
-
import { useCallback as
|
|
6696
|
+
import { useCallback as useCallback76 } from "react";
|
|
6515
6697
|
function useFormService() {
|
|
6516
6698
|
const { env } = useEnv();
|
|
6517
|
-
const getComment =
|
|
6699
|
+
const getComment = useCallback76(
|
|
6518
6700
|
async ({ data }) => {
|
|
6519
6701
|
const jsonData = {
|
|
6520
6702
|
thread_id: data.thread_id,
|
|
@@ -6532,7 +6714,7 @@ function useFormService() {
|
|
|
6532
6714
|
},
|
|
6533
6715
|
[env]
|
|
6534
6716
|
);
|
|
6535
|
-
const getThreadData =
|
|
6717
|
+
const getThreadData = useCallback76(
|
|
6536
6718
|
async ({
|
|
6537
6719
|
data,
|
|
6538
6720
|
xNode,
|
|
@@ -6559,7 +6741,7 @@ function useFormService() {
|
|
|
6559
6741
|
},
|
|
6560
6742
|
[env]
|
|
6561
6743
|
);
|
|
6562
|
-
const getThreadMessages =
|
|
6744
|
+
const getThreadMessages = useCallback76(
|
|
6563
6745
|
async ({
|
|
6564
6746
|
data,
|
|
6565
6747
|
xNode,
|
|
@@ -6585,7 +6767,7 @@ function useFormService() {
|
|
|
6585
6767
|
},
|
|
6586
6768
|
[env]
|
|
6587
6769
|
);
|
|
6588
|
-
const sentComment =
|
|
6770
|
+
const sentComment = useCallback76(
|
|
6589
6771
|
async ({ data }) => {
|
|
6590
6772
|
const jsonData = {
|
|
6591
6773
|
context: {
|
|
@@ -6613,7 +6795,7 @@ function useFormService() {
|
|
|
6613
6795
|
},
|
|
6614
6796
|
[env]
|
|
6615
6797
|
);
|
|
6616
|
-
const deleteComment =
|
|
6798
|
+
const deleteComment = useCallback76(
|
|
6617
6799
|
async ({ data }) => {
|
|
6618
6800
|
const jsonData = {
|
|
6619
6801
|
attachment_ids: [],
|
|
@@ -6629,7 +6811,7 @@ function useFormService() {
|
|
|
6629
6811
|
},
|
|
6630
6812
|
[env]
|
|
6631
6813
|
);
|
|
6632
|
-
const getImage =
|
|
6814
|
+
const getImage = useCallback76(
|
|
6633
6815
|
async ({ data }) => {
|
|
6634
6816
|
return env.requests.get(
|
|
6635
6817
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6642,7 +6824,7 @@ function useFormService() {
|
|
|
6642
6824
|
},
|
|
6643
6825
|
[env]
|
|
6644
6826
|
);
|
|
6645
|
-
const uploadImage =
|
|
6827
|
+
const uploadImage = useCallback76(
|
|
6646
6828
|
async ({
|
|
6647
6829
|
formData,
|
|
6648
6830
|
service,
|
|
@@ -6661,7 +6843,7 @@ function useFormService() {
|
|
|
6661
6843
|
},
|
|
6662
6844
|
[env]
|
|
6663
6845
|
);
|
|
6664
|
-
const uploadFile =
|
|
6846
|
+
const uploadFile = useCallback76(
|
|
6665
6847
|
async ({
|
|
6666
6848
|
formData,
|
|
6667
6849
|
service,
|
|
@@ -6681,7 +6863,7 @@ function useFormService() {
|
|
|
6681
6863
|
},
|
|
6682
6864
|
[env]
|
|
6683
6865
|
);
|
|
6684
|
-
const getFormView =
|
|
6866
|
+
const getFormView = useCallback76(
|
|
6685
6867
|
async ({ data }) => {
|
|
6686
6868
|
const jsonData = {
|
|
6687
6869
|
model: data.model,
|
|
@@ -6697,7 +6879,7 @@ function useFormService() {
|
|
|
6697
6879
|
},
|
|
6698
6880
|
[env]
|
|
6699
6881
|
);
|
|
6700
|
-
const changeStatus =
|
|
6882
|
+
const changeStatus = useCallback76(
|
|
6701
6883
|
async ({ data }) => {
|
|
6702
6884
|
const vals = {
|
|
6703
6885
|
[data.name]: data.stage_id
|
|
@@ -6726,7 +6908,7 @@ function useFormService() {
|
|
|
6726
6908
|
},
|
|
6727
6909
|
[env]
|
|
6728
6910
|
);
|
|
6729
|
-
const getExternalTab =
|
|
6911
|
+
const getExternalTab = useCallback76(
|
|
6730
6912
|
async ({ method, context, service, xNode }) => {
|
|
6731
6913
|
return env?.requests?.post(
|
|
6732
6914
|
"/call" /* CALL_PATH */,
|
|
@@ -6761,10 +6943,10 @@ function useFormService() {
|
|
|
6761
6943
|
}
|
|
6762
6944
|
|
|
6763
6945
|
// src/services/kanban-service/index.ts
|
|
6764
|
-
import { useCallback as
|
|
6946
|
+
import { useCallback as useCallback77 } from "react";
|
|
6765
6947
|
function useKanbanService() {
|
|
6766
6948
|
const { env } = useEnv();
|
|
6767
|
-
const getGroups =
|
|
6949
|
+
const getGroups = useCallback77(
|
|
6768
6950
|
async ({ model, width_context }) => {
|
|
6769
6951
|
const jsonData = {
|
|
6770
6952
|
model,
|
|
@@ -6784,7 +6966,7 @@ function useKanbanService() {
|
|
|
6784
6966
|
},
|
|
6785
6967
|
[env]
|
|
6786
6968
|
);
|
|
6787
|
-
const getProgressBar =
|
|
6969
|
+
const getProgressBar = useCallback77(
|
|
6788
6970
|
async ({ field, color, model, width_context }) => {
|
|
6789
6971
|
const jsonData = {
|
|
6790
6972
|
model,
|
|
@@ -6814,10 +6996,10 @@ function useKanbanService() {
|
|
|
6814
6996
|
}
|
|
6815
6997
|
|
|
6816
6998
|
// src/services/model-service/index.ts
|
|
6817
|
-
import { useCallback as
|
|
6999
|
+
import { useCallback as useCallback78 } from "react";
|
|
6818
7000
|
function useModelService() {
|
|
6819
7001
|
const { env } = useEnv();
|
|
6820
|
-
const getListMyBankAccount =
|
|
7002
|
+
const getListMyBankAccount = useCallback78(
|
|
6821
7003
|
async ({
|
|
6822
7004
|
domain,
|
|
6823
7005
|
spectification,
|
|
@@ -6841,7 +7023,7 @@ function useModelService() {
|
|
|
6841
7023
|
},
|
|
6842
7024
|
[env]
|
|
6843
7025
|
);
|
|
6844
|
-
const getCurrency =
|
|
7026
|
+
const getCurrency = useCallback78(async () => {
|
|
6845
7027
|
const jsonData = {
|
|
6846
7028
|
model: "res.currency",
|
|
6847
7029
|
method: "web_search_read",
|
|
@@ -6861,7 +7043,7 @@ function useModelService() {
|
|
|
6861
7043
|
}
|
|
6862
7044
|
});
|
|
6863
7045
|
}, [env]);
|
|
6864
|
-
const getConversionRate =
|
|
7046
|
+
const getConversionRate = useCallback78(async () => {
|
|
6865
7047
|
const jsonData = {
|
|
6866
7048
|
model: "res.currency",
|
|
6867
7049
|
method: "web_search_read",
|
|
@@ -6887,7 +7069,7 @@ function useModelService() {
|
|
|
6887
7069
|
}
|
|
6888
7070
|
});
|
|
6889
7071
|
}, [env]);
|
|
6890
|
-
const getAll =
|
|
7072
|
+
const getAll = useCallback78(
|
|
6891
7073
|
async ({
|
|
6892
7074
|
data,
|
|
6893
7075
|
service,
|
|
@@ -6929,7 +7111,7 @@ function useModelService() {
|
|
|
6929
7111
|
},
|
|
6930
7112
|
[env]
|
|
6931
7113
|
);
|
|
6932
|
-
const getListCalendar =
|
|
7114
|
+
const getListCalendar = useCallback78(
|
|
6933
7115
|
async ({ data }) => {
|
|
6934
7116
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
6935
7117
|
fields: data.fields,
|
|
@@ -6960,7 +7142,7 @@ function useModelService() {
|
|
|
6960
7142
|
},
|
|
6961
7143
|
[env]
|
|
6962
7144
|
);
|
|
6963
|
-
const getList =
|
|
7145
|
+
const getList = useCallback78(
|
|
6964
7146
|
async ({
|
|
6965
7147
|
model,
|
|
6966
7148
|
ids = [],
|
|
@@ -6992,7 +7174,7 @@ function useModelService() {
|
|
|
6992
7174
|
},
|
|
6993
7175
|
[env]
|
|
6994
7176
|
);
|
|
6995
|
-
const getDetail =
|
|
7177
|
+
const getDetail = useCallback78(
|
|
6996
7178
|
async ({
|
|
6997
7179
|
ids = [],
|
|
6998
7180
|
model,
|
|
@@ -7024,7 +7206,7 @@ function useModelService() {
|
|
|
7024
7206
|
},
|
|
7025
7207
|
[env]
|
|
7026
7208
|
);
|
|
7027
|
-
const save =
|
|
7209
|
+
const save = useCallback78(
|
|
7028
7210
|
async ({
|
|
7029
7211
|
model,
|
|
7030
7212
|
ids = [],
|
|
@@ -7059,7 +7241,7 @@ function useModelService() {
|
|
|
7059
7241
|
},
|
|
7060
7242
|
[env]
|
|
7061
7243
|
);
|
|
7062
|
-
const deleteApi =
|
|
7244
|
+
const deleteApi = useCallback78(
|
|
7063
7245
|
async ({ ids = [], model, service }) => {
|
|
7064
7246
|
const jsonData = {
|
|
7065
7247
|
model,
|
|
@@ -7079,7 +7261,7 @@ function useModelService() {
|
|
|
7079
7261
|
},
|
|
7080
7262
|
[env]
|
|
7081
7263
|
);
|
|
7082
|
-
const onChange =
|
|
7264
|
+
const onChange = useCallback78(
|
|
7083
7265
|
async ({
|
|
7084
7266
|
ids = [],
|
|
7085
7267
|
model,
|
|
@@ -7115,7 +7297,7 @@ function useModelService() {
|
|
|
7115
7297
|
},
|
|
7116
7298
|
[env]
|
|
7117
7299
|
);
|
|
7118
|
-
const getListFieldsOnchange =
|
|
7300
|
+
const getListFieldsOnchange = useCallback78(
|
|
7119
7301
|
async ({
|
|
7120
7302
|
model,
|
|
7121
7303
|
service,
|
|
@@ -7139,7 +7321,7 @@ function useModelService() {
|
|
|
7139
7321
|
},
|
|
7140
7322
|
[env]
|
|
7141
7323
|
);
|
|
7142
|
-
const parseORMOdoo =
|
|
7324
|
+
const parseORMOdoo = useCallback78((data) => {
|
|
7143
7325
|
for (const key in data) {
|
|
7144
7326
|
if (key === "display_name") {
|
|
7145
7327
|
delete data[key];
|
|
@@ -7150,7 +7332,7 @@ function useModelService() {
|
|
|
7150
7332
|
}
|
|
7151
7333
|
return { ...data };
|
|
7152
7334
|
}, []);
|
|
7153
|
-
const toDataJS =
|
|
7335
|
+
const toDataJS = useCallback78(
|
|
7154
7336
|
(data, viewData, model) => {
|
|
7155
7337
|
for (const key in data) {
|
|
7156
7338
|
if (data[key] === false) {
|
|
@@ -7208,10 +7390,10 @@ function useModelService() {
|
|
|
7208
7390
|
}
|
|
7209
7391
|
|
|
7210
7392
|
// src/services/user-service/index.ts
|
|
7211
|
-
import { useCallback as
|
|
7393
|
+
import { useCallback as useCallback79 } from "react";
|
|
7212
7394
|
function useUserService() {
|
|
7213
7395
|
const { env } = useEnv();
|
|
7214
|
-
const getProfile =
|
|
7396
|
+
const getProfile = useCallback79(
|
|
7215
7397
|
async (service, path, extraHeaders) => {
|
|
7216
7398
|
return env?.requests?.get(
|
|
7217
7399
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -7228,7 +7410,7 @@ function useUserService() {
|
|
|
7228
7410
|
},
|
|
7229
7411
|
[env]
|
|
7230
7412
|
);
|
|
7231
|
-
const getUser =
|
|
7413
|
+
const getUser = useCallback79(
|
|
7232
7414
|
async ({ context, id }) => {
|
|
7233
7415
|
const jsonData = {
|
|
7234
7416
|
model: "res.users",
|
|
@@ -7266,7 +7448,7 @@ function useUserService() {
|
|
|
7266
7448
|
},
|
|
7267
7449
|
[env]
|
|
7268
7450
|
);
|
|
7269
|
-
const switchUserLocale =
|
|
7451
|
+
const switchUserLocale = useCallback79(
|
|
7270
7452
|
async ({ id, values, service }) => {
|
|
7271
7453
|
const jsonData = {
|
|
7272
7454
|
model: "res.users",
|
|
@@ -7294,10 +7476,10 @@ function useUserService() {
|
|
|
7294
7476
|
}
|
|
7295
7477
|
|
|
7296
7478
|
// src/services/view-service/index.ts
|
|
7297
|
-
import { useCallback as
|
|
7479
|
+
import { useCallback as useCallback80 } from "react";
|
|
7298
7480
|
function useViewService() {
|
|
7299
7481
|
const { env } = useEnv();
|
|
7300
|
-
const getView =
|
|
7482
|
+
const getView = useCallback80(
|
|
7301
7483
|
async ({
|
|
7302
7484
|
model,
|
|
7303
7485
|
views,
|
|
@@ -7337,7 +7519,7 @@ function useViewService() {
|
|
|
7337
7519
|
},
|
|
7338
7520
|
[env]
|
|
7339
7521
|
);
|
|
7340
|
-
const getMenu =
|
|
7522
|
+
const getMenu = useCallback80(
|
|
7341
7523
|
async (context, specification, domain, service) => {
|
|
7342
7524
|
const jsonData = {
|
|
7343
7525
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -7368,7 +7550,7 @@ function useViewService() {
|
|
|
7368
7550
|
},
|
|
7369
7551
|
[env]
|
|
7370
7552
|
);
|
|
7371
|
-
const getActionDetail =
|
|
7553
|
+
const getActionDetail = useCallback80(
|
|
7372
7554
|
async (aid, context) => {
|
|
7373
7555
|
const jsonData = {
|
|
7374
7556
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7398,7 +7580,7 @@ function useViewService() {
|
|
|
7398
7580
|
},
|
|
7399
7581
|
[env]
|
|
7400
7582
|
);
|
|
7401
|
-
const getResequence =
|
|
7583
|
+
const getResequence = useCallback80(
|
|
7402
7584
|
async ({
|
|
7403
7585
|
model,
|
|
7404
7586
|
ids,
|
|
@@ -7428,7 +7610,7 @@ function useViewService() {
|
|
|
7428
7610
|
},
|
|
7429
7611
|
[env]
|
|
7430
7612
|
);
|
|
7431
|
-
const getSelectionItem =
|
|
7613
|
+
const getSelectionItem = useCallback80(
|
|
7432
7614
|
async ({
|
|
7433
7615
|
data,
|
|
7434
7616
|
service,
|
|
@@ -7465,7 +7647,7 @@ function useViewService() {
|
|
|
7465
7647
|
},
|
|
7466
7648
|
[env]
|
|
7467
7649
|
);
|
|
7468
|
-
const loadMessages =
|
|
7650
|
+
const loadMessages = useCallback80(async () => {
|
|
7469
7651
|
return env.requests.post(
|
|
7470
7652
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7471
7653
|
{},
|
|
@@ -7476,14 +7658,14 @@ function useViewService() {
|
|
|
7476
7658
|
}
|
|
7477
7659
|
);
|
|
7478
7660
|
}, [env]);
|
|
7479
|
-
const getVersion =
|
|
7661
|
+
const getVersion = useCallback80(async () => {
|
|
7480
7662
|
return env?.requests?.get("", {
|
|
7481
7663
|
headers: {
|
|
7482
7664
|
"Content-Type": "application/json"
|
|
7483
7665
|
}
|
|
7484
7666
|
});
|
|
7485
7667
|
}, [env]);
|
|
7486
|
-
const grantAccess =
|
|
7668
|
+
const grantAccess = useCallback80(
|
|
7487
7669
|
async ({
|
|
7488
7670
|
redirect_uri,
|
|
7489
7671
|
state,
|
|
@@ -7510,7 +7692,7 @@ function useViewService() {
|
|
|
7510
7692
|
},
|
|
7511
7693
|
[env]
|
|
7512
7694
|
);
|
|
7513
|
-
const removeTotpSetUp =
|
|
7695
|
+
const removeTotpSetUp = useCallback80(
|
|
7514
7696
|
async ({ method, token }) => {
|
|
7515
7697
|
const jsonData = {
|
|
7516
7698
|
method,
|
|
@@ -7531,7 +7713,7 @@ function useViewService() {
|
|
|
7531
7713
|
},
|
|
7532
7714
|
[env]
|
|
7533
7715
|
);
|
|
7534
|
-
const requestSetupTotp =
|
|
7716
|
+
const requestSetupTotp = useCallback80(
|
|
7535
7717
|
async ({ method, token }) => {
|
|
7536
7718
|
const jsonData = {
|
|
7537
7719
|
method,
|
|
@@ -7550,7 +7732,7 @@ function useViewService() {
|
|
|
7550
7732
|
},
|
|
7551
7733
|
[env]
|
|
7552
7734
|
);
|
|
7553
|
-
const settingsWebRead2fa =
|
|
7735
|
+
const settingsWebRead2fa = useCallback80(
|
|
7554
7736
|
async ({
|
|
7555
7737
|
method,
|
|
7556
7738
|
model,
|
|
@@ -7578,7 +7760,7 @@ function useViewService() {
|
|
|
7578
7760
|
},
|
|
7579
7761
|
[env]
|
|
7580
7762
|
);
|
|
7581
|
-
const signInSSO =
|
|
7763
|
+
const signInSSO = useCallback80(
|
|
7582
7764
|
async ({
|
|
7583
7765
|
redirect_uri,
|
|
7584
7766
|
state,
|
|
@@ -7610,7 +7792,7 @@ function useViewService() {
|
|
|
7610
7792
|
},
|
|
7611
7793
|
[env]
|
|
7612
7794
|
);
|
|
7613
|
-
const verify2FA =
|
|
7795
|
+
const verify2FA = useCallback80(
|
|
7614
7796
|
({
|
|
7615
7797
|
method,
|
|
7616
7798
|
with_context,
|
|
@@ -7643,7 +7825,7 @@ function useViewService() {
|
|
|
7643
7825
|
},
|
|
7644
7826
|
[env]
|
|
7645
7827
|
);
|
|
7646
|
-
const get2FAMethods =
|
|
7828
|
+
const get2FAMethods = useCallback80(
|
|
7647
7829
|
({ method, with_context }) => {
|
|
7648
7830
|
const jsonData = {
|
|
7649
7831
|
method,
|
|
@@ -7662,7 +7844,7 @@ function useViewService() {
|
|
|
7662
7844
|
},
|
|
7663
7845
|
[env]
|
|
7664
7846
|
);
|
|
7665
|
-
const verifyTotp =
|
|
7847
|
+
const verifyTotp = useCallback80(
|
|
7666
7848
|
({
|
|
7667
7849
|
method,
|
|
7668
7850
|
action_token,
|
|
@@ -7687,7 +7869,7 @@ function useViewService() {
|
|
|
7687
7869
|
},
|
|
7688
7870
|
[env]
|
|
7689
7871
|
);
|
|
7690
|
-
const getNotifications =
|
|
7872
|
+
const getNotifications = useCallback80(
|
|
7691
7873
|
async ({
|
|
7692
7874
|
service,
|
|
7693
7875
|
xNode,
|
|
@@ -7707,7 +7889,7 @@ function useViewService() {
|
|
|
7707
7889
|
},
|
|
7708
7890
|
[env]
|
|
7709
7891
|
);
|
|
7710
|
-
const getCountry =
|
|
7892
|
+
const getCountry = useCallback80(
|
|
7711
7893
|
async ({
|
|
7712
7894
|
service,
|
|
7713
7895
|
xNode,
|
|
@@ -7734,7 +7916,7 @@ function useViewService() {
|
|
|
7734
7916
|
},
|
|
7735
7917
|
[env]
|
|
7736
7918
|
);
|
|
7737
|
-
const getCity =
|
|
7919
|
+
const getCity = useCallback80(
|
|
7738
7920
|
async ({
|
|
7739
7921
|
service,
|
|
7740
7922
|
xNode,
|
|
@@ -7761,7 +7943,7 @@ function useViewService() {
|
|
|
7761
7943
|
},
|
|
7762
7944
|
[env]
|
|
7763
7945
|
);
|
|
7764
|
-
const getWard =
|
|
7946
|
+
const getWard = useCallback80(
|
|
7765
7947
|
async ({
|
|
7766
7948
|
service,
|
|
7767
7949
|
xNode,
|
|
@@ -7786,7 +7968,7 @@ function useViewService() {
|
|
|
7786
7968
|
},
|
|
7787
7969
|
[env]
|
|
7788
7970
|
);
|
|
7789
|
-
const getPartnerTitle =
|
|
7971
|
+
const getPartnerTitle = useCallback80(
|
|
7790
7972
|
async ({
|
|
7791
7973
|
service,
|
|
7792
7974
|
xNode,
|
|
@@ -7838,10 +8020,10 @@ function useViewService() {
|
|
|
7838
8020
|
}
|
|
7839
8021
|
|
|
7840
8022
|
// src/services/dashboard-service/index.ts
|
|
7841
|
-
import { useCallback as
|
|
8023
|
+
import { useCallback as useCallback81 } from "react";
|
|
7842
8024
|
function useDashboardService() {
|
|
7843
8025
|
const { env } = useEnv();
|
|
7844
|
-
const readGroup =
|
|
8026
|
+
const readGroup = useCallback81(
|
|
7845
8027
|
async ({
|
|
7846
8028
|
service,
|
|
7847
8029
|
xNode,
|
|
@@ -7858,7 +8040,7 @@ function useDashboardService() {
|
|
|
7858
8040
|
},
|
|
7859
8041
|
[env]
|
|
7860
8042
|
);
|
|
7861
|
-
const getDataChart =
|
|
8043
|
+
const getDataChart = useCallback81(
|
|
7862
8044
|
async ({
|
|
7863
8045
|
service,
|
|
7864
8046
|
xNode,
|