@fctc/interface-logic 5.0.8 → 5.1.0
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 +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +12 -1
- package/dist/hooks.d.ts +12 -1
- package/dist/hooks.js +253 -149
- package/dist/hooks.mjs +251 -149
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +256 -149
- package/dist/index.mjs +254 -149
- package/dist/provider.d.mts +3 -1
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +272 -170
- package/dist/provider.mjs +261 -159
- package/dist/services.d.mts +11 -0
- package/dist/services.d.ts +11 -0
- package/dist/services.js +295 -209
- package/dist/services.mjs +292 -206
- 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 useCallback73 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/constants/api/uri-constant.ts
|
|
5
5
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -4387,10 +4387,59 @@ var completeCurrentStageService = (env) => {
|
|
|
4387
4387
|
};
|
|
4388
4388
|
};
|
|
4389
4389
|
|
|
4390
|
-
// src/services/pos-service/get-
|
|
4390
|
+
// src/services/pos-service/get-e-invoice-info.ts
|
|
4391
4391
|
import { useCallback as useCallback33 } from "react";
|
|
4392
|
+
var getEInvoiceInfoService = (env) => {
|
|
4393
|
+
const getEInvoiceInfo = useCallback33(
|
|
4394
|
+
async ({ xNode, service, uid }) => {
|
|
4395
|
+
const body = {
|
|
4396
|
+
model: "res.company" /* RES_COMPANY */,
|
|
4397
|
+
method: "web_read" /* WEB_READ */,
|
|
4398
|
+
ids: [1],
|
|
4399
|
+
with_context: {
|
|
4400
|
+
uid,
|
|
4401
|
+
lang: "vi_VN",
|
|
4402
|
+
tz: "Asia/Saigon"
|
|
4403
|
+
},
|
|
4404
|
+
kwargs: {
|
|
4405
|
+
specification: {
|
|
4406
|
+
display_name: {},
|
|
4407
|
+
access_token_e_invoice: {},
|
|
4408
|
+
vat: {},
|
|
4409
|
+
partner_gid: {},
|
|
4410
|
+
provider_e_invoice_id: {
|
|
4411
|
+
fields: {
|
|
4412
|
+
id: {},
|
|
4413
|
+
display_name: {}
|
|
4414
|
+
}
|
|
4415
|
+
},
|
|
4416
|
+
sign_serial_e_invoice: {}
|
|
4417
|
+
}
|
|
4418
|
+
}
|
|
4419
|
+
};
|
|
4420
|
+
return env?.requests.post(
|
|
4421
|
+
"/call" /* CALL_PATH */,
|
|
4422
|
+
body,
|
|
4423
|
+
{
|
|
4424
|
+
headers: {
|
|
4425
|
+
"Content-Type": "application/json",
|
|
4426
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4427
|
+
}
|
|
4428
|
+
},
|
|
4429
|
+
service
|
|
4430
|
+
);
|
|
4431
|
+
},
|
|
4432
|
+
[env]
|
|
4433
|
+
);
|
|
4434
|
+
return {
|
|
4435
|
+
getEInvoiceInfo
|
|
4436
|
+
};
|
|
4437
|
+
};
|
|
4438
|
+
|
|
4439
|
+
// src/services/pos-service/get-functional-modules.ts
|
|
4440
|
+
import { useCallback as useCallback34 } from "react";
|
|
4392
4441
|
var getFunctionalModulesService = (env) => {
|
|
4393
|
-
const getFunctionalModules =
|
|
4442
|
+
const getFunctionalModules = useCallback34(
|
|
4394
4443
|
async ({ xNode, service }) => {
|
|
4395
4444
|
return env?.requests.get(
|
|
4396
4445
|
"/functional-modules" /* FUNCTIONAL_MODULES */,
|
|
@@ -4411,9 +4460,9 @@ var getFunctionalModulesService = (env) => {
|
|
|
4411
4460
|
};
|
|
4412
4461
|
|
|
4413
4462
|
// src/services/pos-service/app-authenticate.ts
|
|
4414
|
-
import { useCallback as
|
|
4463
|
+
import { useCallback as useCallback35 } from "react";
|
|
4415
4464
|
var appAuthenticateService = (env) => {
|
|
4416
|
-
const appAuthenticate =
|
|
4465
|
+
const appAuthenticate = useCallback35(
|
|
4417
4466
|
({
|
|
4418
4467
|
xNode,
|
|
4419
4468
|
service,
|
|
@@ -4448,9 +4497,9 @@ var appAuthenticateService = (env) => {
|
|
|
4448
4497
|
};
|
|
4449
4498
|
|
|
4450
4499
|
// src/services/pos-service/apply-voucher.ts
|
|
4451
|
-
import { useCallback as
|
|
4500
|
+
import { useCallback as useCallback36 } from "react";
|
|
4452
4501
|
var applyVoucherService = (env) => {
|
|
4453
|
-
const applyVoucher =
|
|
4502
|
+
const applyVoucher = useCallback36(
|
|
4454
4503
|
({ xNode, service, ids, voucherCode }) => {
|
|
4455
4504
|
const jsonData = {
|
|
4456
4505
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -4480,9 +4529,9 @@ var applyVoucherService = (env) => {
|
|
|
4480
4529
|
};
|
|
4481
4530
|
|
|
4482
4531
|
// src/services/pos-service/remove-voucher.ts
|
|
4483
|
-
import { useCallback as
|
|
4532
|
+
import { useCallback as useCallback37 } from "react";
|
|
4484
4533
|
var removeVoucherService = (env) => {
|
|
4485
|
-
const removeVoucher =
|
|
4534
|
+
const removeVoucher = useCallback37(
|
|
4486
4535
|
({ xNode, service, ids, programId }) => {
|
|
4487
4536
|
const jsonData = {
|
|
4488
4537
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -4512,9 +4561,9 @@ var removeVoucherService = (env) => {
|
|
|
4512
4561
|
};
|
|
4513
4562
|
|
|
4514
4563
|
// src/services/pos-service/sync-from-ui.ts
|
|
4515
|
-
import { useCallback as
|
|
4564
|
+
import { useCallback as useCallback38 } from "react";
|
|
4516
4565
|
var syncFromUiService = (env) => {
|
|
4517
|
-
const syncFromUi =
|
|
4566
|
+
const syncFromUi = useCallback38(
|
|
4518
4567
|
({ xNode, service, orders }) => {
|
|
4519
4568
|
const jsonData = {
|
|
4520
4569
|
method: "sync_from_ui" /* SYNC_FROM_UI */,
|
|
@@ -4543,10 +4592,10 @@ var syncFromUiService = (env) => {
|
|
|
4543
4592
|
};
|
|
4544
4593
|
|
|
4545
4594
|
// src/services/pos-service/supabase/add-floor.ts
|
|
4546
|
-
import { useCallback as
|
|
4595
|
+
import { useCallback as useCallback39 } from "react";
|
|
4547
4596
|
var addFloorSupabaseService = () => {
|
|
4548
4597
|
const supabase = useSupabaseOptional();
|
|
4549
|
-
const addFloorSupabase =
|
|
4598
|
+
const addFloorSupabase = useCallback39(
|
|
4550
4599
|
async (values) => {
|
|
4551
4600
|
if (!supabase) {
|
|
4552
4601
|
console.error("Supabase client not initialized");
|
|
@@ -4577,10 +4626,10 @@ var addFloorSupabaseService = () => {
|
|
|
4577
4626
|
};
|
|
4578
4627
|
|
|
4579
4628
|
// src/services/pos-service/supabase/add-table.ts
|
|
4580
|
-
import { useCallback as
|
|
4629
|
+
import { useCallback as useCallback40 } from "react";
|
|
4581
4630
|
var addTableSupabaseService = () => {
|
|
4582
4631
|
const supabase = useSupabaseOptional();
|
|
4583
|
-
const addTableSupabase =
|
|
4632
|
+
const addTableSupabase = useCallback40(
|
|
4584
4633
|
async (values) => {
|
|
4585
4634
|
if (!supabase) {
|
|
4586
4635
|
console.error("Supabase client not initialized");
|
|
@@ -4610,10 +4659,10 @@ var addTableSupabaseService = () => {
|
|
|
4610
4659
|
};
|
|
4611
4660
|
|
|
4612
4661
|
// src/services/pos-service/supabase/update-floor.ts
|
|
4613
|
-
import { useCallback as
|
|
4662
|
+
import { useCallback as useCallback41 } from "react";
|
|
4614
4663
|
var updateFloorSupabaseService = () => {
|
|
4615
4664
|
const supabase = useSupabaseOptional();
|
|
4616
|
-
const updateFloorSupabase =
|
|
4665
|
+
const updateFloorSupabase = useCallback41(
|
|
4617
4666
|
async (values) => {
|
|
4618
4667
|
if (!supabase) {
|
|
4619
4668
|
console.error("Supabase client not initialized");
|
|
@@ -4640,10 +4689,10 @@ var updateFloorSupabaseService = () => {
|
|
|
4640
4689
|
};
|
|
4641
4690
|
|
|
4642
4691
|
// src/services/pos-service/supabase/update-table.ts
|
|
4643
|
-
import { useCallback as
|
|
4692
|
+
import { useCallback as useCallback42 } from "react";
|
|
4644
4693
|
var updateTableSupabaseService = () => {
|
|
4645
4694
|
const supabase = useSupabaseOptional();
|
|
4646
|
-
const updateTableSupabase =
|
|
4695
|
+
const updateTableSupabase = useCallback42(
|
|
4647
4696
|
async (values) => {
|
|
4648
4697
|
if (!supabase) {
|
|
4649
4698
|
console.error("Supabase client not initialized");
|
|
@@ -4670,10 +4719,10 @@ var updateTableSupabaseService = () => {
|
|
|
4670
4719
|
};
|
|
4671
4720
|
|
|
4672
4721
|
// src/services/pos-service/supabase/delete-floor.ts
|
|
4673
|
-
import { useCallback as
|
|
4722
|
+
import { useCallback as useCallback43 } from "react";
|
|
4674
4723
|
var deleteFloorSupabaseService = () => {
|
|
4675
4724
|
const supabase = useSupabaseOptional();
|
|
4676
|
-
const deleteFloorSupabase =
|
|
4725
|
+
const deleteFloorSupabase = useCallback43(
|
|
4677
4726
|
async (values) => {
|
|
4678
4727
|
if (!supabase) {
|
|
4679
4728
|
console.error("Supabase client not initialized");
|
|
@@ -4699,10 +4748,10 @@ var deleteFloorSupabaseService = () => {
|
|
|
4699
4748
|
};
|
|
4700
4749
|
|
|
4701
4750
|
// src/services/pos-service/supabase/delete-table.ts
|
|
4702
|
-
import { useCallback as
|
|
4751
|
+
import { useCallback as useCallback44 } from "react";
|
|
4703
4752
|
var deleteTableSupabaseService = () => {
|
|
4704
4753
|
const supabase = useSupabaseOptional();
|
|
4705
|
-
const deleteTableSupabase =
|
|
4754
|
+
const deleteTableSupabase = useCallback44(
|
|
4706
4755
|
async (values) => {
|
|
4707
4756
|
if (!supabase) {
|
|
4708
4757
|
console.error("Supabase client not initialized");
|
|
@@ -4728,10 +4777,10 @@ var deleteTableSupabaseService = () => {
|
|
|
4728
4777
|
};
|
|
4729
4778
|
|
|
4730
4779
|
// src/services/pos-service/supabase/create-order.ts
|
|
4731
|
-
import { useCallback as
|
|
4780
|
+
import { useCallback as useCallback45 } from "react";
|
|
4732
4781
|
var createOrderSupabaseService = () => {
|
|
4733
4782
|
const supabase = useSupabaseOptional();
|
|
4734
|
-
const createOrderSupabase =
|
|
4783
|
+
const createOrderSupabase = useCallback45(
|
|
4735
4784
|
async (values) => {
|
|
4736
4785
|
if (!supabase) {
|
|
4737
4786
|
console.error("Supabase client not initialized");
|
|
@@ -4766,10 +4815,10 @@ var createOrderSupabaseService = () => {
|
|
|
4766
4815
|
};
|
|
4767
4816
|
|
|
4768
4817
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4769
|
-
import { useCallback as
|
|
4818
|
+
import { useCallback as useCallback46 } from "react";
|
|
4770
4819
|
var addProductToOrderSupabaseService = () => {
|
|
4771
4820
|
const supabase = useSupabaseOptional();
|
|
4772
|
-
const addProductToOrderSupabase =
|
|
4821
|
+
const addProductToOrderSupabase = useCallback46(
|
|
4773
4822
|
async (values) => {
|
|
4774
4823
|
if (!supabase) {
|
|
4775
4824
|
console.error("Supabase client not initialized");
|
|
@@ -4806,10 +4855,10 @@ var addProductToOrderSupabaseService = () => {
|
|
|
4806
4855
|
};
|
|
4807
4856
|
|
|
4808
4857
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4809
|
-
import { useCallback as
|
|
4858
|
+
import { useCallback as useCallback47 } from "react";
|
|
4810
4859
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
4811
4860
|
const supabase = useSupabaseOptional();
|
|
4812
|
-
const updateOrderTotalAmountSupabase =
|
|
4861
|
+
const updateOrderTotalAmountSupabase = useCallback47(
|
|
4813
4862
|
async (values) => {
|
|
4814
4863
|
if (!supabase) {
|
|
4815
4864
|
console.error("Supabase client not initialized");
|
|
@@ -4839,10 +4888,10 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
4839
4888
|
};
|
|
4840
4889
|
|
|
4841
4890
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
4842
|
-
import { useCallback as
|
|
4891
|
+
import { useCallback as useCallback48 } from "react";
|
|
4843
4892
|
var updateOrderLineSupabaseService = () => {
|
|
4844
4893
|
const supabase = useSupabaseOptional();
|
|
4845
|
-
const updateOrderLineSupabase =
|
|
4894
|
+
const updateOrderLineSupabase = useCallback48(
|
|
4846
4895
|
async (values) => {
|
|
4847
4896
|
if (!supabase) {
|
|
4848
4897
|
console.error("Supabase client not initialized");
|
|
@@ -4874,10 +4923,10 @@ var updateOrderLineSupabaseService = () => {
|
|
|
4874
4923
|
};
|
|
4875
4924
|
|
|
4876
4925
|
// src/services/pos-service/supabase/update-order.ts
|
|
4877
|
-
import { useCallback as
|
|
4926
|
+
import { useCallback as useCallback49 } from "react";
|
|
4878
4927
|
var updateOrderSupabaseService = () => {
|
|
4879
4928
|
const supabase = useSupabaseOptional();
|
|
4880
|
-
const updateOrderSupabase =
|
|
4929
|
+
const updateOrderSupabase = useCallback49(
|
|
4881
4930
|
async (values) => {
|
|
4882
4931
|
if (!supabase) {
|
|
4883
4932
|
console.error("Supabase client not initialized");
|
|
@@ -4911,10 +4960,10 @@ var updateOrderSupabaseService = () => {
|
|
|
4911
4960
|
};
|
|
4912
4961
|
|
|
4913
4962
|
// src/services/pos-service/supabase/delete-order.ts
|
|
4914
|
-
import { useCallback as
|
|
4963
|
+
import { useCallback as useCallback50 } from "react";
|
|
4915
4964
|
var deleteOrderSupabaseService = () => {
|
|
4916
4965
|
const supabase = useSupabaseOptional();
|
|
4917
|
-
const deleteOrderSupabase =
|
|
4966
|
+
const deleteOrderSupabase = useCallback50(
|
|
4918
4967
|
async (values) => {
|
|
4919
4968
|
if (!supabase) {
|
|
4920
4969
|
console.error("Supabase client not initialized");
|
|
@@ -4940,10 +4989,10 @@ var deleteOrderSupabaseService = () => {
|
|
|
4940
4989
|
};
|
|
4941
4990
|
|
|
4942
4991
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4943
|
-
import { useCallback as
|
|
4992
|
+
import { useCallback as useCallback51 } from "react";
|
|
4944
4993
|
var deleteOrderLineSupabaseService = () => {
|
|
4945
4994
|
const supabase = useSupabaseOptional();
|
|
4946
|
-
const deleteOrderLineSupabase =
|
|
4995
|
+
const deleteOrderLineSupabase = useCallback51(
|
|
4947
4996
|
async (values) => {
|
|
4948
4997
|
if (!supabase) {
|
|
4949
4998
|
console.error("Supabase client not initialized");
|
|
@@ -4969,10 +5018,10 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
4969
5018
|
};
|
|
4970
5019
|
|
|
4971
5020
|
// src/services/pos-service/supabase/add-category.ts
|
|
4972
|
-
import { useCallback as
|
|
5021
|
+
import { useCallback as useCallback52 } from "react";
|
|
4973
5022
|
var addCategorySupabaseService = () => {
|
|
4974
5023
|
const supabase = useSupabaseOptional();
|
|
4975
|
-
const addCategorySupabase =
|
|
5024
|
+
const addCategorySupabase = useCallback52(
|
|
4976
5025
|
async (values) => {
|
|
4977
5026
|
if (!supabase) {
|
|
4978
5027
|
console.error("Supabase client not initialized");
|
|
@@ -5000,10 +5049,10 @@ var addCategorySupabaseService = () => {
|
|
|
5000
5049
|
};
|
|
5001
5050
|
|
|
5002
5051
|
// src/services/pos-service/supabase/add-product.ts
|
|
5003
|
-
import { useCallback as
|
|
5052
|
+
import { useCallback as useCallback53 } from "react";
|
|
5004
5053
|
var addProductSupabaseService = () => {
|
|
5005
5054
|
const supabase = useSupabaseOptional();
|
|
5006
|
-
const addProductSupabase =
|
|
5055
|
+
const addProductSupabase = useCallback53(
|
|
5007
5056
|
async (values) => {
|
|
5008
5057
|
if (!supabase) {
|
|
5009
5058
|
console.error("Supabase client not initialized");
|
|
@@ -5045,10 +5094,10 @@ var addProductSupabaseService = () => {
|
|
|
5045
5094
|
};
|
|
5046
5095
|
|
|
5047
5096
|
// src/services/pos-service/supabase/add-payment-method.ts
|
|
5048
|
-
import { useCallback as
|
|
5097
|
+
import { useCallback as useCallback54 } from "react";
|
|
5049
5098
|
var addPaymentMethodSupabaseService = () => {
|
|
5050
5099
|
const supabase = useSupabaseOptional();
|
|
5051
|
-
const addPaymentMethodSupabase =
|
|
5100
|
+
const addPaymentMethodSupabase = useCallback54(
|
|
5052
5101
|
async (values) => {
|
|
5053
5102
|
if (!supabase) {
|
|
5054
5103
|
console.error("Supabase client not initialized");
|
|
@@ -5079,10 +5128,10 @@ var addPaymentMethodSupabaseService = () => {
|
|
|
5079
5128
|
};
|
|
5080
5129
|
|
|
5081
5130
|
// src/services/pos-service/supabase/update-session-payment-methods.ts
|
|
5082
|
-
import { useCallback as
|
|
5131
|
+
import { useCallback as useCallback55 } from "react";
|
|
5083
5132
|
var updateSessionPaymentMethodsSupabaseService = () => {
|
|
5084
5133
|
const supabase = useSupabaseOptional();
|
|
5085
|
-
const updateSessionPaymentMethodsSupabase =
|
|
5134
|
+
const updateSessionPaymentMethodsSupabase = useCallback55(
|
|
5086
5135
|
async (values) => {
|
|
5087
5136
|
if (!supabase) {
|
|
5088
5137
|
console.error("Supabase client not initialized");
|
|
@@ -5111,10 +5160,10 @@ var updateSessionPaymentMethodsSupabaseService = () => {
|
|
|
5111
5160
|
};
|
|
5112
5161
|
|
|
5113
5162
|
// src/services/pos-service/supabase/create-payment.ts
|
|
5114
|
-
import { useCallback as
|
|
5163
|
+
import { useCallback as useCallback56 } from "react";
|
|
5115
5164
|
var createPaymentSupabaseService = () => {
|
|
5116
5165
|
const supabase = useSupabaseOptional();
|
|
5117
|
-
const createPaymentSupabase =
|
|
5166
|
+
const createPaymentSupabase = useCallback56(
|
|
5118
5167
|
async (values) => {
|
|
5119
5168
|
if (!supabase) {
|
|
5120
5169
|
console.error("Supabase client not initialized");
|
|
@@ -5155,10 +5204,10 @@ var createPaymentSupabaseService = () => {
|
|
|
5155
5204
|
};
|
|
5156
5205
|
|
|
5157
5206
|
// src/services/pos-service/supabase/create-customer.ts
|
|
5158
|
-
import { useCallback as
|
|
5207
|
+
import { useCallback as useCallback57 } from "react";
|
|
5159
5208
|
var createCustomerSupabaseService = () => {
|
|
5160
5209
|
const supabase = useSupabaseOptional();
|
|
5161
|
-
const createCustomerSupabase =
|
|
5210
|
+
const createCustomerSupabase = useCallback57(
|
|
5162
5211
|
async (values) => {
|
|
5163
5212
|
if (!supabase) {
|
|
5164
5213
|
console.error("Supabase client not initialized");
|
|
@@ -5196,10 +5245,10 @@ var createCustomerSupabaseService = () => {
|
|
|
5196
5245
|
};
|
|
5197
5246
|
|
|
5198
5247
|
// src/services/pos-service/supabase/update-customer.ts
|
|
5199
|
-
import { useCallback as
|
|
5248
|
+
import { useCallback as useCallback58 } from "react";
|
|
5200
5249
|
var updateCustomerSupabaseService = () => {
|
|
5201
5250
|
const supabase = useSupabaseOptional();
|
|
5202
|
-
const updateCustomerSupabase =
|
|
5251
|
+
const updateCustomerSupabase = useCallback58(
|
|
5203
5252
|
async (values) => {
|
|
5204
5253
|
if (!supabase) {
|
|
5205
5254
|
console.error("Supabase client not initialized");
|
|
@@ -5230,10 +5279,10 @@ var updateCustomerSupabaseService = () => {
|
|
|
5230
5279
|
};
|
|
5231
5280
|
|
|
5232
5281
|
// src/services/pos-service/supabase/delete-customer.ts
|
|
5233
|
-
import { useCallback as
|
|
5282
|
+
import { useCallback as useCallback59 } from "react";
|
|
5234
5283
|
var deleteCustomerSupabaseService = () => {
|
|
5235
5284
|
const supabase = useSupabaseOptional();
|
|
5236
|
-
const deleteCustomerSupabase =
|
|
5285
|
+
const deleteCustomerSupabase = useCallback59(
|
|
5237
5286
|
async (values) => {
|
|
5238
5287
|
if (!supabase) {
|
|
5239
5288
|
console.error("Supabase client not initialized");
|
|
@@ -5259,10 +5308,10 @@ var deleteCustomerSupabaseService = () => {
|
|
|
5259
5308
|
};
|
|
5260
5309
|
|
|
5261
5310
|
// src/services/pos-service/supabase/upload-image.ts
|
|
5262
|
-
import { useCallback as
|
|
5311
|
+
import { useCallback as useCallback60 } from "react";
|
|
5263
5312
|
var uploadImageSupabaseService = () => {
|
|
5264
5313
|
const supabase = useSupabaseOptional();
|
|
5265
|
-
const uploadImageSupabase =
|
|
5314
|
+
const uploadImageSupabase = useCallback60(
|
|
5266
5315
|
async (file, tenantId) => {
|
|
5267
5316
|
if (!supabase) {
|
|
5268
5317
|
console.error("Supabase client not initialized");
|
|
@@ -5297,9 +5346,9 @@ var uploadImageSupabaseService = () => {
|
|
|
5297
5346
|
};
|
|
5298
5347
|
|
|
5299
5348
|
// src/services/pos-service/supabase/get-list-users.ts
|
|
5300
|
-
import { useCallback as
|
|
5349
|
+
import { useCallback as useCallback61 } from "react";
|
|
5301
5350
|
var getListUsersService = (env) => {
|
|
5302
|
-
const getListUsers =
|
|
5351
|
+
const getListUsers = useCallback61(
|
|
5303
5352
|
({ tenantId }) => {
|
|
5304
5353
|
const jsonData = {
|
|
5305
5354
|
model: "tenant.users",
|
|
@@ -5320,9 +5369,9 @@ var getListUsersService = (env) => {
|
|
|
5320
5369
|
};
|
|
5321
5370
|
|
|
5322
5371
|
// src/services/pos-service/supabase/get-list-roles.ts
|
|
5323
|
-
import { useCallback as
|
|
5372
|
+
import { useCallback as useCallback62 } from "react";
|
|
5324
5373
|
var getListRolesService = (env) => {
|
|
5325
|
-
const getListRoles =
|
|
5374
|
+
const getListRoles = useCallback62(
|
|
5326
5375
|
({ tenantId }) => {
|
|
5327
5376
|
const jsonData = {
|
|
5328
5377
|
model: "tenant.roles",
|
|
@@ -5343,9 +5392,9 @@ var getListRolesService = (env) => {
|
|
|
5343
5392
|
};
|
|
5344
5393
|
|
|
5345
5394
|
// src/services/pos-service/supabase/assign-role.ts
|
|
5346
|
-
import { useCallback as
|
|
5395
|
+
import { useCallback as useCallback63 } from "react";
|
|
5347
5396
|
var assignRoleService = (env) => {
|
|
5348
|
-
const assignRole =
|
|
5397
|
+
const assignRole = useCallback63(
|
|
5349
5398
|
({
|
|
5350
5399
|
tenantId,
|
|
5351
5400
|
userId,
|
|
@@ -5374,10 +5423,10 @@ var assignRoleService = (env) => {
|
|
|
5374
5423
|
};
|
|
5375
5424
|
|
|
5376
5425
|
// src/services/pos-service/supabase/get-states.ts
|
|
5377
|
-
import { useCallback as
|
|
5426
|
+
import { useCallback as useCallback64 } from "react";
|
|
5378
5427
|
var getStatesSupabaseService = () => {
|
|
5379
5428
|
const supabase = useSupabaseOptional();
|
|
5380
|
-
const getStatesSupabase =
|
|
5429
|
+
const getStatesSupabase = useCallback64(async () => {
|
|
5381
5430
|
if (!supabase) return { length: 0, records: [] };
|
|
5382
5431
|
const { data, error } = await supabase.from("states" /* STATES */).select("*");
|
|
5383
5432
|
if (error) {
|
|
@@ -5393,10 +5442,10 @@ var getStatesSupabaseService = () => {
|
|
|
5393
5442
|
};
|
|
5394
5443
|
|
|
5395
5444
|
// src/services/pos-service/supabase/get-wards.ts
|
|
5396
|
-
import { useCallback as
|
|
5445
|
+
import { useCallback as useCallback65 } from "react";
|
|
5397
5446
|
var getWardsSupabaseService = () => {
|
|
5398
5447
|
const supabase = useSupabaseOptional();
|
|
5399
|
-
const getWardsSupabase =
|
|
5448
|
+
const getWardsSupabase = useCallback65(async () => {
|
|
5400
5449
|
if (!supabase) return { length: 0, records: [] };
|
|
5401
5450
|
const { data, error } = await supabase.from("wards" /* WARDS */).select("*");
|
|
5402
5451
|
if (error) {
|
|
@@ -5412,10 +5461,10 @@ var getWardsSupabaseService = () => {
|
|
|
5412
5461
|
};
|
|
5413
5462
|
|
|
5414
5463
|
// src/services/pos-service/supabase/get-partner-titles.ts
|
|
5415
|
-
import { useCallback as
|
|
5464
|
+
import { useCallback as useCallback66 } from "react";
|
|
5416
5465
|
var getPartnerTitlesSupabaseService = () => {
|
|
5417
5466
|
const supabase = useSupabaseOptional();
|
|
5418
|
-
const getPartnerTitlesSupabase =
|
|
5467
|
+
const getPartnerTitlesSupabase = useCallback66(async () => {
|
|
5419
5468
|
if (!supabase) return { length: 0, records: [] };
|
|
5420
5469
|
const { data, error } = await supabase.from("partner_titles" /* PARTNER_TITLES */).select("*");
|
|
5421
5470
|
if (error) {
|
|
@@ -5431,9 +5480,9 @@ var getPartnerTitlesSupabaseService = () => {
|
|
|
5431
5480
|
};
|
|
5432
5481
|
|
|
5433
5482
|
// src/services/pos-service/supabase/get-supa-current-user.ts
|
|
5434
|
-
import { useCallback as
|
|
5483
|
+
import { useCallback as useCallback67 } from "react";
|
|
5435
5484
|
var getSupaCurrentUser = (env) => {
|
|
5436
|
-
const getSupaCurrentUser2 =
|
|
5485
|
+
const getSupaCurrentUser2 = useCallback67(
|
|
5437
5486
|
({ tenantId }) => {
|
|
5438
5487
|
return env?.requests.get("/api/v2/auth/me" /* SUPABASE_CURRENT_USER */, {
|
|
5439
5488
|
headers: {
|
|
@@ -5450,10 +5499,10 @@ var getSupaCurrentUser = (env) => {
|
|
|
5450
5499
|
};
|
|
5451
5500
|
|
|
5452
5501
|
// src/services/pos-service/supabase/update-category.ts
|
|
5453
|
-
import { useCallback as
|
|
5502
|
+
import { useCallback as useCallback68 } from "react";
|
|
5454
5503
|
var updateCategorySupabaseService = () => {
|
|
5455
5504
|
const supabase = useSupabaseOptional();
|
|
5456
|
-
const updateCategorySupabase =
|
|
5505
|
+
const updateCategorySupabase = useCallback68(
|
|
5457
5506
|
async (values) => {
|
|
5458
5507
|
if (!supabase) {
|
|
5459
5508
|
console.error("Supabase client not initialized");
|
|
@@ -5480,10 +5529,10 @@ var updateCategorySupabaseService = () => {
|
|
|
5480
5529
|
};
|
|
5481
5530
|
|
|
5482
5531
|
// src/services/pos-service/supabase/delete-category.ts
|
|
5483
|
-
import { useCallback as
|
|
5532
|
+
import { useCallback as useCallback69 } from "react";
|
|
5484
5533
|
var deleteCategorySupabaseService = () => {
|
|
5485
5534
|
const supabase = useSupabaseOptional();
|
|
5486
|
-
const deleteCategorySupabase =
|
|
5535
|
+
const deleteCategorySupabase = useCallback69(
|
|
5487
5536
|
async (values) => {
|
|
5488
5537
|
if (!supabase) {
|
|
5489
5538
|
console.error("Supabase client not initialized");
|
|
@@ -5509,10 +5558,10 @@ var deleteCategorySupabaseService = () => {
|
|
|
5509
5558
|
};
|
|
5510
5559
|
|
|
5511
5560
|
// src/services/pos-service/supabase/update-product.ts
|
|
5512
|
-
import { useCallback as
|
|
5561
|
+
import { useCallback as useCallback70 } from "react";
|
|
5513
5562
|
var updateProductSupabaseService = () => {
|
|
5514
5563
|
const supabase = useSupabaseOptional();
|
|
5515
|
-
const updateProductSupabase =
|
|
5564
|
+
const updateProductSupabase = useCallback70(
|
|
5516
5565
|
async (values) => {
|
|
5517
5566
|
if (!supabase) {
|
|
5518
5567
|
console.error("Supabase client not initialized");
|
|
@@ -5540,10 +5589,10 @@ var updateProductSupabaseService = () => {
|
|
|
5540
5589
|
};
|
|
5541
5590
|
|
|
5542
5591
|
// src/services/pos-service/supabase/delete-product.ts
|
|
5543
|
-
import { useCallback as
|
|
5592
|
+
import { useCallback as useCallback71 } from "react";
|
|
5544
5593
|
var deleteProductSupabaseService = () => {
|
|
5545
5594
|
const supabase = useSupabaseOptional();
|
|
5546
|
-
const deleteProductSupabase =
|
|
5595
|
+
const deleteProductSupabase = useCallback71(
|
|
5547
5596
|
async (values) => {
|
|
5548
5597
|
if (!supabase) {
|
|
5549
5598
|
console.error("Supabase client not initialized");
|
|
@@ -5568,6 +5617,35 @@ var deleteProductSupabaseService = () => {
|
|
|
5568
5617
|
};
|
|
5569
5618
|
};
|
|
5570
5619
|
|
|
5620
|
+
// src/services/pos-service/supabase/toggle-pos-restaurant.ts
|
|
5621
|
+
import { useCallback as useCallback72 } from "react";
|
|
5622
|
+
var togglePosRestaurantSupabaseService = () => {
|
|
5623
|
+
const supabase = useSupabaseOptional();
|
|
5624
|
+
const togglePosRestaurantSupabase = useCallback72(
|
|
5625
|
+
async (values) => {
|
|
5626
|
+
if (!supabase) {
|
|
5627
|
+
console.error("Supabase client not initialized");
|
|
5628
|
+
return null;
|
|
5629
|
+
}
|
|
5630
|
+
try {
|
|
5631
|
+
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();
|
|
5632
|
+
if (error) {
|
|
5633
|
+
console.error("Error toggling pos restaurant mode:", error);
|
|
5634
|
+
return null;
|
|
5635
|
+
}
|
|
5636
|
+
return [data.id];
|
|
5637
|
+
} catch (error) {
|
|
5638
|
+
console.error("Error toggling pos restaurant mode:", error);
|
|
5639
|
+
return null;
|
|
5640
|
+
}
|
|
5641
|
+
},
|
|
5642
|
+
[supabase]
|
|
5643
|
+
);
|
|
5644
|
+
return {
|
|
5645
|
+
togglePosRestaurantSupabase
|
|
5646
|
+
};
|
|
5647
|
+
};
|
|
5648
|
+
|
|
5571
5649
|
// src/services/pos-service/index.ts
|
|
5572
5650
|
var serviceFactories = [
|
|
5573
5651
|
addEntityService,
|
|
@@ -5600,6 +5678,7 @@ var serviceFactories = [
|
|
|
5600
5678
|
updateEntityService,
|
|
5601
5679
|
updateOrderStatusService,
|
|
5602
5680
|
completeCurrentStageService,
|
|
5681
|
+
getEInvoiceInfoService,
|
|
5603
5682
|
appAuthenticateService,
|
|
5604
5683
|
applyVoucherService,
|
|
5605
5684
|
removeVoucherService,
|
|
@@ -5637,7 +5716,8 @@ var serviceFactories = [
|
|
|
5637
5716
|
updateCategorySupabaseService,
|
|
5638
5717
|
deleteCategorySupabaseService,
|
|
5639
5718
|
updateProductSupabaseService,
|
|
5640
|
-
deleteProductSupabaseService
|
|
5719
|
+
deleteProductSupabaseService,
|
|
5720
|
+
togglePosRestaurantSupabaseService
|
|
5641
5721
|
];
|
|
5642
5722
|
var usePosService = () => {
|
|
5643
5723
|
const { env } = useEnv();
|
|
@@ -5757,111 +5837,117 @@ import { useMutation as useMutation87 } from "@tanstack/react-query";
|
|
|
5757
5837
|
// src/hooks/pos/use-complete-current-stage.ts
|
|
5758
5838
|
import { useMutation as useMutation88 } from "@tanstack/react-query";
|
|
5759
5839
|
|
|
5760
|
-
// src/hooks/pos/use-
|
|
5840
|
+
// src/hooks/pos/use-get-e-invoice-info.ts
|
|
5761
5841
|
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
5762
5842
|
|
|
5763
|
-
// src/hooks/pos/use-
|
|
5843
|
+
// src/hooks/pos/use-app-authenticate.ts
|
|
5764
5844
|
import { useMutation as useMutation90 } from "@tanstack/react-query";
|
|
5765
5845
|
|
|
5766
|
-
// src/hooks/pos/use-
|
|
5846
|
+
// src/hooks/pos/use-apply-voucher.ts
|
|
5767
5847
|
import { useMutation as useMutation91 } from "@tanstack/react-query";
|
|
5768
5848
|
|
|
5769
|
-
// src/hooks/pos/use-
|
|
5849
|
+
// src/hooks/pos/use-remove-voucher.ts
|
|
5770
5850
|
import { useMutation as useMutation92 } from "@tanstack/react-query";
|
|
5771
5851
|
|
|
5772
|
-
// src/hooks/pos/
|
|
5852
|
+
// src/hooks/pos/use-sync-from-ui.ts
|
|
5773
5853
|
import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
5774
5854
|
|
|
5775
|
-
// src/hooks/pos/supabase/use-add-
|
|
5855
|
+
// src/hooks/pos/supabase/use-add-floor.ts
|
|
5776
5856
|
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
5777
5857
|
|
|
5778
|
-
// src/hooks/pos/supabase/use-
|
|
5858
|
+
// src/hooks/pos/supabase/use-add-table.ts
|
|
5779
5859
|
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
5780
5860
|
|
|
5781
|
-
// src/hooks/pos/supabase/use-update-
|
|
5861
|
+
// src/hooks/pos/supabase/use-update-floor.ts
|
|
5782
5862
|
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
5783
5863
|
|
|
5784
|
-
// src/hooks/pos/supabase/use-
|
|
5864
|
+
// src/hooks/pos/supabase/use-update-table.ts
|
|
5785
5865
|
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
5786
5866
|
|
|
5787
|
-
// src/hooks/pos/supabase/use-delete-
|
|
5867
|
+
// src/hooks/pos/supabase/use-delete-floor.ts
|
|
5788
5868
|
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
5789
5869
|
|
|
5790
|
-
// src/hooks/pos/supabase/use-
|
|
5870
|
+
// src/hooks/pos/supabase/use-delete-table.ts
|
|
5791
5871
|
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
5792
5872
|
|
|
5793
|
-
// src/hooks/pos/supabase/use-
|
|
5873
|
+
// src/hooks/pos/supabase/use-create-order.ts
|
|
5794
5874
|
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
5795
5875
|
|
|
5796
|
-
// src/hooks/pos/supabase/use-add-
|
|
5876
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
5797
5877
|
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
5798
5878
|
|
|
5799
|
-
// src/hooks/pos/supabase/use-
|
|
5879
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
5800
5880
|
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
5801
5881
|
|
|
5802
|
-
// src/hooks/pos/supabase/use-update-order-
|
|
5882
|
+
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
5803
5883
|
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
5804
5884
|
|
|
5805
|
-
// src/hooks/pos/supabase/use-update-order.ts
|
|
5885
|
+
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
5806
5886
|
import { useMutation as useMutation104 } from "@tanstack/react-query";
|
|
5807
5887
|
|
|
5808
|
-
// src/hooks/pos/supabase/use-
|
|
5888
|
+
// src/hooks/pos/supabase/use-update-order.ts
|
|
5809
5889
|
import { useMutation as useMutation105 } from "@tanstack/react-query";
|
|
5810
5890
|
|
|
5811
|
-
// src/hooks/pos/supabase/use-delete-order
|
|
5891
|
+
// src/hooks/pos/supabase/use-delete-order.ts
|
|
5812
5892
|
import { useMutation as useMutation106 } from "@tanstack/react-query";
|
|
5813
5893
|
|
|
5814
|
-
// src/hooks/pos/supabase/use-
|
|
5894
|
+
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
5815
5895
|
import { useMutation as useMutation107 } from "@tanstack/react-query";
|
|
5816
5896
|
|
|
5817
|
-
// src/hooks/pos/use-
|
|
5897
|
+
// src/hooks/pos/supabase/use-add-product.ts
|
|
5818
5898
|
import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
5819
5899
|
|
|
5820
|
-
// src/hooks/pos/
|
|
5900
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
5821
5901
|
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
5822
5902
|
|
|
5823
|
-
// src/hooks/pos/supabase/use-
|
|
5903
|
+
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
5824
5904
|
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
5825
5905
|
|
|
5826
|
-
// src/hooks/pos/supabase/use-
|
|
5906
|
+
// src/hooks/pos/supabase/use-update-session-payment-methods.ts
|
|
5827
5907
|
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
5828
5908
|
|
|
5829
|
-
// src/hooks/pos/supabase/use-create-
|
|
5909
|
+
// src/hooks/pos/supabase/use-create-payment.ts
|
|
5830
5910
|
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
5831
5911
|
|
|
5832
|
-
// src/hooks/pos/supabase/use-
|
|
5912
|
+
// src/hooks/pos/supabase/use-create-customer.ts
|
|
5833
5913
|
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
5834
5914
|
|
|
5835
|
-
// src/hooks/pos/supabase/use-
|
|
5915
|
+
// src/hooks/pos/supabase/use-update-customer.ts
|
|
5836
5916
|
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
5837
5917
|
|
|
5838
|
-
// src/hooks/pos/supabase/use-
|
|
5918
|
+
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
5839
5919
|
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
5840
5920
|
|
|
5841
|
-
// src/hooks/pos/supabase/use-
|
|
5921
|
+
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
5842
5922
|
import { useMutation as useMutation116 } from "@tanstack/react-query";
|
|
5843
5923
|
|
|
5844
|
-
// src/hooks/pos/supabase/use-get-list-
|
|
5924
|
+
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
5845
5925
|
import { useMutation as useMutation117 } from "@tanstack/react-query";
|
|
5846
5926
|
|
|
5847
|
-
// src/hooks/pos/supabase/use-
|
|
5927
|
+
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
5848
5928
|
import { useMutation as useMutation118 } from "@tanstack/react-query";
|
|
5849
5929
|
|
|
5850
|
-
// src/hooks/pos/supabase/use-
|
|
5930
|
+
// src/hooks/pos/supabase/use-assign-role.ts
|
|
5851
5931
|
import { useMutation as useMutation119 } from "@tanstack/react-query";
|
|
5852
5932
|
|
|
5853
|
-
// src/hooks/pos/supabase/use-
|
|
5933
|
+
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
5854
5934
|
import { useMutation as useMutation120 } from "@tanstack/react-query";
|
|
5855
5935
|
|
|
5856
|
-
// src/hooks/pos/supabase/use-
|
|
5936
|
+
// src/hooks/pos/supabase/use-update-category.ts
|
|
5857
5937
|
import { useMutation as useMutation121 } from "@tanstack/react-query";
|
|
5858
5938
|
|
|
5859
|
-
// src/hooks/pos/supabase/use-
|
|
5939
|
+
// src/hooks/pos/supabase/use-delete-category.ts
|
|
5860
5940
|
import { useMutation as useMutation122 } from "@tanstack/react-query";
|
|
5861
5941
|
|
|
5862
|
-
// src/hooks/pos/supabase/use-
|
|
5942
|
+
// src/hooks/pos/supabase/use-update-product.ts
|
|
5863
5943
|
import { useMutation as useMutation123 } from "@tanstack/react-query";
|
|
5864
5944
|
|
|
5945
|
+
// src/hooks/pos/supabase/use-delete-product.ts
|
|
5946
|
+
import { useMutation as useMutation124 } from "@tanstack/react-query";
|
|
5947
|
+
|
|
5948
|
+
// src/hooks/pos/supabase/use-toggle-pos-restaurant.ts
|
|
5949
|
+
import { useMutation as useMutation125 } from "@tanstack/react-query";
|
|
5950
|
+
|
|
5865
5951
|
// src/provider/service-provider.tsx
|
|
5866
5952
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
5867
5953
|
var ServiceContext = createContext3(null);
|
|
@@ -5873,7 +5959,7 @@ import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
|
|
|
5873
5959
|
// src/services/action-service/index.ts
|
|
5874
5960
|
function useActionService() {
|
|
5875
5961
|
const { env } = useEnv();
|
|
5876
|
-
const loadAction =
|
|
5962
|
+
const loadAction = useCallback73(
|
|
5877
5963
|
async ({
|
|
5878
5964
|
idAction,
|
|
5879
5965
|
context,
|
|
@@ -5897,7 +5983,7 @@ function useActionService() {
|
|
|
5897
5983
|
},
|
|
5898
5984
|
[env]
|
|
5899
5985
|
);
|
|
5900
|
-
const callButton =
|
|
5986
|
+
const callButton = useCallback73(
|
|
5901
5987
|
async ({
|
|
5902
5988
|
model,
|
|
5903
5989
|
ids = [],
|
|
@@ -5931,7 +6017,7 @@ function useActionService() {
|
|
|
5931
6017
|
},
|
|
5932
6018
|
[env]
|
|
5933
6019
|
);
|
|
5934
|
-
const removeRows =
|
|
6020
|
+
const removeRows = useCallback73(
|
|
5935
6021
|
async ({
|
|
5936
6022
|
model,
|
|
5937
6023
|
ids,
|
|
@@ -5957,7 +6043,7 @@ function useActionService() {
|
|
|
5957
6043
|
},
|
|
5958
6044
|
[env]
|
|
5959
6045
|
);
|
|
5960
|
-
const duplicateRecord =
|
|
6046
|
+
const duplicateRecord = useCallback73(
|
|
5961
6047
|
async ({
|
|
5962
6048
|
model,
|
|
5963
6049
|
id,
|
|
@@ -5983,7 +6069,7 @@ function useActionService() {
|
|
|
5983
6069
|
},
|
|
5984
6070
|
[env]
|
|
5985
6071
|
);
|
|
5986
|
-
const getPrintReportName =
|
|
6072
|
+
const getPrintReportName = useCallback73(
|
|
5987
6073
|
async ({ id }) => {
|
|
5988
6074
|
const jsonData = {
|
|
5989
6075
|
model: "ir.actions.report",
|
|
@@ -6001,7 +6087,7 @@ function useActionService() {
|
|
|
6001
6087
|
},
|
|
6002
6088
|
[env]
|
|
6003
6089
|
);
|
|
6004
|
-
const print =
|
|
6090
|
+
const print = useCallback73(
|
|
6005
6091
|
async ({ id, report, db }) => {
|
|
6006
6092
|
const jsonData = {
|
|
6007
6093
|
report,
|
|
@@ -6019,7 +6105,7 @@ function useActionService() {
|
|
|
6019
6105
|
},
|
|
6020
6106
|
[env]
|
|
6021
6107
|
);
|
|
6022
|
-
const runAction =
|
|
6108
|
+
const runAction = useCallback73(
|
|
6023
6109
|
async ({
|
|
6024
6110
|
idAction,
|
|
6025
6111
|
context,
|
|
@@ -6046,7 +6132,7 @@ function useActionService() {
|
|
|
6046
6132
|
},
|
|
6047
6133
|
[env]
|
|
6048
6134
|
);
|
|
6049
|
-
const generateSerialNumber =
|
|
6135
|
+
const generateSerialNumber = useCallback73(
|
|
6050
6136
|
async ({
|
|
6051
6137
|
kwargs,
|
|
6052
6138
|
context,
|
|
@@ -6071,7 +6157,7 @@ function useActionService() {
|
|
|
6071
6157
|
},
|
|
6072
6158
|
[env]
|
|
6073
6159
|
);
|
|
6074
|
-
const actionServerHome =
|
|
6160
|
+
const actionServerHome = useCallback73(async () => {
|
|
6075
6161
|
return env?.requests?.get("/action_server_home" /* ACTION_SERVER_HOME */);
|
|
6076
6162
|
}, [env]);
|
|
6077
6163
|
return {
|
|
@@ -6088,11 +6174,11 @@ function useActionService() {
|
|
|
6088
6174
|
}
|
|
6089
6175
|
|
|
6090
6176
|
// src/services/auth-service/index.ts
|
|
6091
|
-
import { useCallback as
|
|
6177
|
+
import { useCallback as useCallback74 } from "react";
|
|
6092
6178
|
function useAuthService() {
|
|
6093
6179
|
const { env } = useEnv();
|
|
6094
6180
|
const supabase = useSupabaseOptional();
|
|
6095
|
-
const login =
|
|
6181
|
+
const login = useCallback74(
|
|
6096
6182
|
async (body) => {
|
|
6097
6183
|
const payload = Object.fromEntries(
|
|
6098
6184
|
Object.entries({
|
|
@@ -6117,7 +6203,7 @@ function useAuthService() {
|
|
|
6117
6203
|
},
|
|
6118
6204
|
[env]
|
|
6119
6205
|
);
|
|
6120
|
-
const loginTenantUser =
|
|
6206
|
+
const loginTenantUser = useCallback74(
|
|
6121
6207
|
async (body) => {
|
|
6122
6208
|
const payload = {
|
|
6123
6209
|
email: body.email,
|
|
@@ -6132,7 +6218,7 @@ function useAuthService() {
|
|
|
6132
6218
|
},
|
|
6133
6219
|
[env]
|
|
6134
6220
|
);
|
|
6135
|
-
const forgotPassword =
|
|
6221
|
+
const forgotPassword = useCallback74(
|
|
6136
6222
|
async (email) => {
|
|
6137
6223
|
const bodyData = {
|
|
6138
6224
|
login: email,
|
|
@@ -6146,7 +6232,7 @@ function useAuthService() {
|
|
|
6146
6232
|
},
|
|
6147
6233
|
[env]
|
|
6148
6234
|
);
|
|
6149
|
-
const forgotPasswordSSO =
|
|
6235
|
+
const forgotPasswordSSO = useCallback74(
|
|
6150
6236
|
async ({
|
|
6151
6237
|
email,
|
|
6152
6238
|
with_context,
|
|
@@ -6169,7 +6255,7 @@ function useAuthService() {
|
|
|
6169
6255
|
},
|
|
6170
6256
|
[env]
|
|
6171
6257
|
);
|
|
6172
|
-
const resetPassword =
|
|
6258
|
+
const resetPassword = useCallback74(
|
|
6173
6259
|
async (data, token) => {
|
|
6174
6260
|
const bodyData = {
|
|
6175
6261
|
token,
|
|
@@ -6184,7 +6270,7 @@ function useAuthService() {
|
|
|
6184
6270
|
},
|
|
6185
6271
|
[env]
|
|
6186
6272
|
);
|
|
6187
|
-
const resetPasswordSSO =
|
|
6273
|
+
const resetPasswordSSO = useCallback74(
|
|
6188
6274
|
async ({
|
|
6189
6275
|
method,
|
|
6190
6276
|
password,
|
|
@@ -6207,7 +6293,7 @@ function useAuthService() {
|
|
|
6207
6293
|
},
|
|
6208
6294
|
[env]
|
|
6209
6295
|
);
|
|
6210
|
-
const updatePassword =
|
|
6296
|
+
const updatePassword = useCallback74(
|
|
6211
6297
|
async (data, token) => {
|
|
6212
6298
|
const bodyData = {
|
|
6213
6299
|
token,
|
|
@@ -6222,7 +6308,7 @@ function useAuthService() {
|
|
|
6222
6308
|
},
|
|
6223
6309
|
[env]
|
|
6224
6310
|
);
|
|
6225
|
-
const isValidToken =
|
|
6311
|
+
const isValidToken = useCallback74(
|
|
6226
6312
|
async (token) => {
|
|
6227
6313
|
const bodyData = {
|
|
6228
6314
|
token
|
|
@@ -6235,7 +6321,7 @@ function useAuthService() {
|
|
|
6235
6321
|
},
|
|
6236
6322
|
[env]
|
|
6237
6323
|
);
|
|
6238
|
-
const isValidActionToken =
|
|
6324
|
+
const isValidActionToken = useCallback74(
|
|
6239
6325
|
async (actionToken) => {
|
|
6240
6326
|
const bodyData = {};
|
|
6241
6327
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -6248,7 +6334,7 @@ function useAuthService() {
|
|
|
6248
6334
|
},
|
|
6249
6335
|
[env]
|
|
6250
6336
|
);
|
|
6251
|
-
const loginSocial =
|
|
6337
|
+
const loginSocial = useCallback74(
|
|
6252
6338
|
async ({
|
|
6253
6339
|
db,
|
|
6254
6340
|
state,
|
|
@@ -6266,13 +6352,13 @@ function useAuthService() {
|
|
|
6266
6352
|
},
|
|
6267
6353
|
[env]
|
|
6268
6354
|
);
|
|
6269
|
-
const getProviders =
|
|
6355
|
+
const getProviders = useCallback74(
|
|
6270
6356
|
async (db) => {
|
|
6271
6357
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
6272
6358
|
},
|
|
6273
6359
|
[env]
|
|
6274
6360
|
);
|
|
6275
|
-
const getAccessByCode =
|
|
6361
|
+
const getAccessByCode = useCallback74(
|
|
6276
6362
|
async (code) => {
|
|
6277
6363
|
const data = new URLSearchParams();
|
|
6278
6364
|
data.append("code", code);
|
|
@@ -6292,7 +6378,7 @@ function useAuthService() {
|
|
|
6292
6378
|
},
|
|
6293
6379
|
[env]
|
|
6294
6380
|
);
|
|
6295
|
-
const logout =
|
|
6381
|
+
const logout = useCallback74(
|
|
6296
6382
|
async (service) => {
|
|
6297
6383
|
return env?.requests?.post(
|
|
6298
6384
|
"/logout" /* LOGOUT */,
|
|
@@ -6309,7 +6395,7 @@ function useAuthService() {
|
|
|
6309
6395
|
},
|
|
6310
6396
|
[env]
|
|
6311
6397
|
);
|
|
6312
|
-
const getTenantMapping =
|
|
6398
|
+
const getTenantMapping = useCallback74(
|
|
6313
6399
|
async ({ shortName, service }) => {
|
|
6314
6400
|
const bodyData = {
|
|
6315
6401
|
short_name: shortName
|
|
@@ -6327,7 +6413,7 @@ function useAuthService() {
|
|
|
6327
6413
|
},
|
|
6328
6414
|
[env]
|
|
6329
6415
|
);
|
|
6330
|
-
const getToken =
|
|
6416
|
+
const getToken = useCallback74(
|
|
6331
6417
|
async ({
|
|
6332
6418
|
phone,
|
|
6333
6419
|
name,
|
|
@@ -6372,10 +6458,10 @@ function useAuthService() {
|
|
|
6372
6458
|
}
|
|
6373
6459
|
|
|
6374
6460
|
// src/services/company-service/index.ts
|
|
6375
|
-
import { useCallback as
|
|
6461
|
+
import { useCallback as useCallback75 } from "react";
|
|
6376
6462
|
function useCompanyService() {
|
|
6377
6463
|
const { env } = useEnv();
|
|
6378
|
-
const getCurrentCompany =
|
|
6464
|
+
const getCurrentCompany = useCallback75(
|
|
6379
6465
|
async (service, extraHeaders) => {
|
|
6380
6466
|
return await env.requests.get(
|
|
6381
6467
|
"/company" /* COMPANY_PATH */,
|
|
@@ -6392,7 +6478,7 @@ function useCompanyService() {
|
|
|
6392
6478
|
},
|
|
6393
6479
|
[env]
|
|
6394
6480
|
);
|
|
6395
|
-
const getInfoCompany =
|
|
6481
|
+
const getInfoCompany = useCallback75(
|
|
6396
6482
|
async (id, service) => {
|
|
6397
6483
|
const jsonData = {
|
|
6398
6484
|
ids: [id],
|
|
@@ -6428,10 +6514,10 @@ function useCompanyService() {
|
|
|
6428
6514
|
}
|
|
6429
6515
|
|
|
6430
6516
|
// src/services/excel-service/index.ts
|
|
6431
|
-
import { useCallback as
|
|
6517
|
+
import { useCallback as useCallback76 } from "react";
|
|
6432
6518
|
function useExcelService() {
|
|
6433
6519
|
const { env } = useEnv();
|
|
6434
|
-
const uploadFileExcel =
|
|
6520
|
+
const uploadFileExcel = useCallback76(
|
|
6435
6521
|
async ({
|
|
6436
6522
|
formData,
|
|
6437
6523
|
service,
|
|
@@ -6448,7 +6534,7 @@ function useExcelService() {
|
|
|
6448
6534
|
},
|
|
6449
6535
|
[env]
|
|
6450
6536
|
);
|
|
6451
|
-
const uploadIdFile =
|
|
6537
|
+
const uploadIdFile = useCallback76(
|
|
6452
6538
|
async ({
|
|
6453
6539
|
formData,
|
|
6454
6540
|
service,
|
|
@@ -6465,7 +6551,7 @@ function useExcelService() {
|
|
|
6465
6551
|
},
|
|
6466
6552
|
[env]
|
|
6467
6553
|
);
|
|
6468
|
-
const parsePreview =
|
|
6554
|
+
const parsePreview = useCallback76(
|
|
6469
6555
|
async ({
|
|
6470
6556
|
id,
|
|
6471
6557
|
selectedSheet,
|
|
@@ -6514,7 +6600,7 @@ function useExcelService() {
|
|
|
6514
6600
|
},
|
|
6515
6601
|
[env]
|
|
6516
6602
|
);
|
|
6517
|
-
const executeImport =
|
|
6603
|
+
const executeImport = useCallback76(
|
|
6518
6604
|
async ({
|
|
6519
6605
|
columns,
|
|
6520
6606
|
fields,
|
|
@@ -6548,7 +6634,7 @@ function useExcelService() {
|
|
|
6548
6634
|
},
|
|
6549
6635
|
[env]
|
|
6550
6636
|
);
|
|
6551
|
-
const getFileExcel =
|
|
6637
|
+
const getFileExcel = useCallback76(
|
|
6552
6638
|
async ({
|
|
6553
6639
|
model,
|
|
6554
6640
|
service,
|
|
@@ -6572,7 +6658,7 @@ function useExcelService() {
|
|
|
6572
6658
|
},
|
|
6573
6659
|
[env]
|
|
6574
6660
|
);
|
|
6575
|
-
const getFieldExport =
|
|
6661
|
+
const getFieldExport = useCallback76(
|
|
6576
6662
|
async ({
|
|
6577
6663
|
ids,
|
|
6578
6664
|
model,
|
|
@@ -6612,7 +6698,7 @@ function useExcelService() {
|
|
|
6612
6698
|
},
|
|
6613
6699
|
[env]
|
|
6614
6700
|
);
|
|
6615
|
-
const exportExcel =
|
|
6701
|
+
const exportExcel = useCallback76(
|
|
6616
6702
|
async ({
|
|
6617
6703
|
model,
|
|
6618
6704
|
domain,
|
|
@@ -6660,10 +6746,10 @@ function useExcelService() {
|
|
|
6660
6746
|
}
|
|
6661
6747
|
|
|
6662
6748
|
// src/services/form-service/index.ts
|
|
6663
|
-
import { useCallback as
|
|
6749
|
+
import { useCallback as useCallback77 } from "react";
|
|
6664
6750
|
function useFormService() {
|
|
6665
6751
|
const { env } = useEnv();
|
|
6666
|
-
const getComment =
|
|
6752
|
+
const getComment = useCallback77(
|
|
6667
6753
|
async ({ data }) => {
|
|
6668
6754
|
const jsonData = {
|
|
6669
6755
|
thread_id: data.thread_id,
|
|
@@ -6681,7 +6767,7 @@ function useFormService() {
|
|
|
6681
6767
|
},
|
|
6682
6768
|
[env]
|
|
6683
6769
|
);
|
|
6684
|
-
const getThreadData =
|
|
6770
|
+
const getThreadData = useCallback77(
|
|
6685
6771
|
async ({
|
|
6686
6772
|
data,
|
|
6687
6773
|
xNode,
|
|
@@ -6708,7 +6794,7 @@ function useFormService() {
|
|
|
6708
6794
|
},
|
|
6709
6795
|
[env]
|
|
6710
6796
|
);
|
|
6711
|
-
const getThreadMessages =
|
|
6797
|
+
const getThreadMessages = useCallback77(
|
|
6712
6798
|
async ({
|
|
6713
6799
|
data,
|
|
6714
6800
|
xNode,
|
|
@@ -6734,7 +6820,7 @@ function useFormService() {
|
|
|
6734
6820
|
},
|
|
6735
6821
|
[env]
|
|
6736
6822
|
);
|
|
6737
|
-
const sentComment =
|
|
6823
|
+
const sentComment = useCallback77(
|
|
6738
6824
|
async ({ data }) => {
|
|
6739
6825
|
const jsonData = {
|
|
6740
6826
|
context: {
|
|
@@ -6762,7 +6848,7 @@ function useFormService() {
|
|
|
6762
6848
|
},
|
|
6763
6849
|
[env]
|
|
6764
6850
|
);
|
|
6765
|
-
const deleteComment =
|
|
6851
|
+
const deleteComment = useCallback77(
|
|
6766
6852
|
async ({ data }) => {
|
|
6767
6853
|
const jsonData = {
|
|
6768
6854
|
attachment_ids: [],
|
|
@@ -6778,7 +6864,7 @@ function useFormService() {
|
|
|
6778
6864
|
},
|
|
6779
6865
|
[env]
|
|
6780
6866
|
);
|
|
6781
|
-
const getImage =
|
|
6867
|
+
const getImage = useCallback77(
|
|
6782
6868
|
async ({ data }) => {
|
|
6783
6869
|
return env.requests.get(
|
|
6784
6870
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -6791,7 +6877,7 @@ function useFormService() {
|
|
|
6791
6877
|
},
|
|
6792
6878
|
[env]
|
|
6793
6879
|
);
|
|
6794
|
-
const uploadImage =
|
|
6880
|
+
const uploadImage = useCallback77(
|
|
6795
6881
|
async ({
|
|
6796
6882
|
formData,
|
|
6797
6883
|
service,
|
|
@@ -6810,7 +6896,7 @@ function useFormService() {
|
|
|
6810
6896
|
},
|
|
6811
6897
|
[env]
|
|
6812
6898
|
);
|
|
6813
|
-
const uploadFile =
|
|
6899
|
+
const uploadFile = useCallback77(
|
|
6814
6900
|
async ({
|
|
6815
6901
|
formData,
|
|
6816
6902
|
service,
|
|
@@ -6830,7 +6916,7 @@ function useFormService() {
|
|
|
6830
6916
|
},
|
|
6831
6917
|
[env]
|
|
6832
6918
|
);
|
|
6833
|
-
const getFormView =
|
|
6919
|
+
const getFormView = useCallback77(
|
|
6834
6920
|
async ({ data }) => {
|
|
6835
6921
|
const jsonData = {
|
|
6836
6922
|
model: data.model,
|
|
@@ -6846,7 +6932,7 @@ function useFormService() {
|
|
|
6846
6932
|
},
|
|
6847
6933
|
[env]
|
|
6848
6934
|
);
|
|
6849
|
-
const changeStatus =
|
|
6935
|
+
const changeStatus = useCallback77(
|
|
6850
6936
|
async ({ data }) => {
|
|
6851
6937
|
const vals = {
|
|
6852
6938
|
[data.name]: data.stage_id
|
|
@@ -6875,7 +6961,7 @@ function useFormService() {
|
|
|
6875
6961
|
},
|
|
6876
6962
|
[env]
|
|
6877
6963
|
);
|
|
6878
|
-
const getExternalTab =
|
|
6964
|
+
const getExternalTab = useCallback77(
|
|
6879
6965
|
async ({ method, context, service, xNode }) => {
|
|
6880
6966
|
return env?.requests?.post(
|
|
6881
6967
|
"/call" /* CALL_PATH */,
|
|
@@ -6910,10 +6996,10 @@ function useFormService() {
|
|
|
6910
6996
|
}
|
|
6911
6997
|
|
|
6912
6998
|
// src/services/kanban-service/index.ts
|
|
6913
|
-
import { useCallback as
|
|
6999
|
+
import { useCallback as useCallback78 } from "react";
|
|
6914
7000
|
function useKanbanService() {
|
|
6915
7001
|
const { env } = useEnv();
|
|
6916
|
-
const getGroups =
|
|
7002
|
+
const getGroups = useCallback78(
|
|
6917
7003
|
async ({ model, width_context }) => {
|
|
6918
7004
|
const jsonData = {
|
|
6919
7005
|
model,
|
|
@@ -6933,7 +7019,7 @@ function useKanbanService() {
|
|
|
6933
7019
|
},
|
|
6934
7020
|
[env]
|
|
6935
7021
|
);
|
|
6936
|
-
const getProgressBar =
|
|
7022
|
+
const getProgressBar = useCallback78(
|
|
6937
7023
|
async ({ field, color, model, width_context }) => {
|
|
6938
7024
|
const jsonData = {
|
|
6939
7025
|
model,
|
|
@@ -6963,10 +7049,10 @@ function useKanbanService() {
|
|
|
6963
7049
|
}
|
|
6964
7050
|
|
|
6965
7051
|
// src/services/model-service/index.ts
|
|
6966
|
-
import { useCallback as
|
|
7052
|
+
import { useCallback as useCallback79 } from "react";
|
|
6967
7053
|
function useModelService() {
|
|
6968
7054
|
const { env } = useEnv();
|
|
6969
|
-
const getListMyBankAccount =
|
|
7055
|
+
const getListMyBankAccount = useCallback79(
|
|
6970
7056
|
async ({
|
|
6971
7057
|
domain,
|
|
6972
7058
|
spectification,
|
|
@@ -6990,7 +7076,7 @@ function useModelService() {
|
|
|
6990
7076
|
},
|
|
6991
7077
|
[env]
|
|
6992
7078
|
);
|
|
6993
|
-
const getCurrency =
|
|
7079
|
+
const getCurrency = useCallback79(async () => {
|
|
6994
7080
|
const jsonData = {
|
|
6995
7081
|
model: "res.currency",
|
|
6996
7082
|
method: "web_search_read",
|
|
@@ -7010,7 +7096,7 @@ function useModelService() {
|
|
|
7010
7096
|
}
|
|
7011
7097
|
});
|
|
7012
7098
|
}, [env]);
|
|
7013
|
-
const getConversionRate =
|
|
7099
|
+
const getConversionRate = useCallback79(async () => {
|
|
7014
7100
|
const jsonData = {
|
|
7015
7101
|
model: "res.currency",
|
|
7016
7102
|
method: "web_search_read",
|
|
@@ -7036,7 +7122,7 @@ function useModelService() {
|
|
|
7036
7122
|
}
|
|
7037
7123
|
});
|
|
7038
7124
|
}, [env]);
|
|
7039
|
-
const getAll =
|
|
7125
|
+
const getAll = useCallback79(
|
|
7040
7126
|
async ({
|
|
7041
7127
|
data,
|
|
7042
7128
|
service,
|
|
@@ -7078,7 +7164,7 @@ function useModelService() {
|
|
|
7078
7164
|
},
|
|
7079
7165
|
[env]
|
|
7080
7166
|
);
|
|
7081
|
-
const getListCalendar =
|
|
7167
|
+
const getListCalendar = useCallback79(
|
|
7082
7168
|
async ({ data }) => {
|
|
7083
7169
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
7084
7170
|
fields: data.fields,
|
|
@@ -7109,7 +7195,7 @@ function useModelService() {
|
|
|
7109
7195
|
},
|
|
7110
7196
|
[env]
|
|
7111
7197
|
);
|
|
7112
|
-
const getList =
|
|
7198
|
+
const getList = useCallback79(
|
|
7113
7199
|
async ({
|
|
7114
7200
|
model,
|
|
7115
7201
|
ids = [],
|
|
@@ -7141,7 +7227,7 @@ function useModelService() {
|
|
|
7141
7227
|
},
|
|
7142
7228
|
[env]
|
|
7143
7229
|
);
|
|
7144
|
-
const getDetail =
|
|
7230
|
+
const getDetail = useCallback79(
|
|
7145
7231
|
async ({
|
|
7146
7232
|
ids = [],
|
|
7147
7233
|
model,
|
|
@@ -7173,7 +7259,7 @@ function useModelService() {
|
|
|
7173
7259
|
},
|
|
7174
7260
|
[env]
|
|
7175
7261
|
);
|
|
7176
|
-
const save =
|
|
7262
|
+
const save = useCallback79(
|
|
7177
7263
|
async ({
|
|
7178
7264
|
model,
|
|
7179
7265
|
ids = [],
|
|
@@ -7208,7 +7294,7 @@ function useModelService() {
|
|
|
7208
7294
|
},
|
|
7209
7295
|
[env]
|
|
7210
7296
|
);
|
|
7211
|
-
const deleteApi =
|
|
7297
|
+
const deleteApi = useCallback79(
|
|
7212
7298
|
async ({ ids = [], model, service }) => {
|
|
7213
7299
|
const jsonData = {
|
|
7214
7300
|
model,
|
|
@@ -7228,7 +7314,7 @@ function useModelService() {
|
|
|
7228
7314
|
},
|
|
7229
7315
|
[env]
|
|
7230
7316
|
);
|
|
7231
|
-
const onChange =
|
|
7317
|
+
const onChange = useCallback79(
|
|
7232
7318
|
async ({
|
|
7233
7319
|
ids = [],
|
|
7234
7320
|
model,
|
|
@@ -7264,7 +7350,7 @@ function useModelService() {
|
|
|
7264
7350
|
},
|
|
7265
7351
|
[env]
|
|
7266
7352
|
);
|
|
7267
|
-
const getListFieldsOnchange =
|
|
7353
|
+
const getListFieldsOnchange = useCallback79(
|
|
7268
7354
|
async ({
|
|
7269
7355
|
model,
|
|
7270
7356
|
service,
|
|
@@ -7288,7 +7374,7 @@ function useModelService() {
|
|
|
7288
7374
|
},
|
|
7289
7375
|
[env]
|
|
7290
7376
|
);
|
|
7291
|
-
const parseORMOdoo =
|
|
7377
|
+
const parseORMOdoo = useCallback79((data) => {
|
|
7292
7378
|
for (const key in data) {
|
|
7293
7379
|
if (key === "display_name") {
|
|
7294
7380
|
delete data[key];
|
|
@@ -7299,7 +7385,7 @@ function useModelService() {
|
|
|
7299
7385
|
}
|
|
7300
7386
|
return { ...data };
|
|
7301
7387
|
}, []);
|
|
7302
|
-
const toDataJS =
|
|
7388
|
+
const toDataJS = useCallback79(
|
|
7303
7389
|
(data, viewData, model) => {
|
|
7304
7390
|
for (const key in data) {
|
|
7305
7391
|
if (data[key] === false) {
|
|
@@ -7357,10 +7443,10 @@ function useModelService() {
|
|
|
7357
7443
|
}
|
|
7358
7444
|
|
|
7359
7445
|
// src/services/user-service/index.ts
|
|
7360
|
-
import { useCallback as
|
|
7446
|
+
import { useCallback as useCallback80 } from "react";
|
|
7361
7447
|
function useUserService() {
|
|
7362
7448
|
const { env } = useEnv();
|
|
7363
|
-
const getProfile =
|
|
7449
|
+
const getProfile = useCallback80(
|
|
7364
7450
|
async (service, path, extraHeaders) => {
|
|
7365
7451
|
return env?.requests?.get(
|
|
7366
7452
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -7377,7 +7463,7 @@ function useUserService() {
|
|
|
7377
7463
|
},
|
|
7378
7464
|
[env]
|
|
7379
7465
|
);
|
|
7380
|
-
const getUser =
|
|
7466
|
+
const getUser = useCallback80(
|
|
7381
7467
|
async ({ context, id }) => {
|
|
7382
7468
|
const jsonData = {
|
|
7383
7469
|
model: "res.users",
|
|
@@ -7415,7 +7501,7 @@ function useUserService() {
|
|
|
7415
7501
|
},
|
|
7416
7502
|
[env]
|
|
7417
7503
|
);
|
|
7418
|
-
const switchUserLocale =
|
|
7504
|
+
const switchUserLocale = useCallback80(
|
|
7419
7505
|
async ({ id, values, service }) => {
|
|
7420
7506
|
const jsonData = {
|
|
7421
7507
|
model: "res.users",
|
|
@@ -7443,10 +7529,10 @@ function useUserService() {
|
|
|
7443
7529
|
}
|
|
7444
7530
|
|
|
7445
7531
|
// src/services/view-service/index.ts
|
|
7446
|
-
import { useCallback as
|
|
7532
|
+
import { useCallback as useCallback81 } from "react";
|
|
7447
7533
|
function useViewService() {
|
|
7448
7534
|
const { env } = useEnv();
|
|
7449
|
-
const getView =
|
|
7535
|
+
const getView = useCallback81(
|
|
7450
7536
|
async ({
|
|
7451
7537
|
model,
|
|
7452
7538
|
views,
|
|
@@ -7486,7 +7572,7 @@ function useViewService() {
|
|
|
7486
7572
|
},
|
|
7487
7573
|
[env]
|
|
7488
7574
|
);
|
|
7489
|
-
const getMenu =
|
|
7575
|
+
const getMenu = useCallback81(
|
|
7490
7576
|
async (context, specification, domain, service) => {
|
|
7491
7577
|
const jsonData = {
|
|
7492
7578
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -7517,7 +7603,7 @@ function useViewService() {
|
|
|
7517
7603
|
},
|
|
7518
7604
|
[env]
|
|
7519
7605
|
);
|
|
7520
|
-
const getActionDetail =
|
|
7606
|
+
const getActionDetail = useCallback81(
|
|
7521
7607
|
async (aid, context) => {
|
|
7522
7608
|
const jsonData = {
|
|
7523
7609
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -7547,7 +7633,7 @@ function useViewService() {
|
|
|
7547
7633
|
},
|
|
7548
7634
|
[env]
|
|
7549
7635
|
);
|
|
7550
|
-
const getResequence =
|
|
7636
|
+
const getResequence = useCallback81(
|
|
7551
7637
|
async ({
|
|
7552
7638
|
model,
|
|
7553
7639
|
ids,
|
|
@@ -7577,7 +7663,7 @@ function useViewService() {
|
|
|
7577
7663
|
},
|
|
7578
7664
|
[env]
|
|
7579
7665
|
);
|
|
7580
|
-
const getSelectionItem =
|
|
7666
|
+
const getSelectionItem = useCallback81(
|
|
7581
7667
|
async ({
|
|
7582
7668
|
data,
|
|
7583
7669
|
service,
|
|
@@ -7614,7 +7700,7 @@ function useViewService() {
|
|
|
7614
7700
|
},
|
|
7615
7701
|
[env]
|
|
7616
7702
|
);
|
|
7617
|
-
const loadMessages =
|
|
7703
|
+
const loadMessages = useCallback81(async () => {
|
|
7618
7704
|
return env.requests.post(
|
|
7619
7705
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
7620
7706
|
{},
|
|
@@ -7625,14 +7711,14 @@ function useViewService() {
|
|
|
7625
7711
|
}
|
|
7626
7712
|
);
|
|
7627
7713
|
}, [env]);
|
|
7628
|
-
const getVersion =
|
|
7714
|
+
const getVersion = useCallback81(async () => {
|
|
7629
7715
|
return env?.requests?.get("", {
|
|
7630
7716
|
headers: {
|
|
7631
7717
|
"Content-Type": "application/json"
|
|
7632
7718
|
}
|
|
7633
7719
|
});
|
|
7634
7720
|
}, [env]);
|
|
7635
|
-
const grantAccess =
|
|
7721
|
+
const grantAccess = useCallback81(
|
|
7636
7722
|
async ({
|
|
7637
7723
|
redirect_uri,
|
|
7638
7724
|
state,
|
|
@@ -7659,7 +7745,7 @@ function useViewService() {
|
|
|
7659
7745
|
},
|
|
7660
7746
|
[env]
|
|
7661
7747
|
);
|
|
7662
|
-
const removeTotpSetUp =
|
|
7748
|
+
const removeTotpSetUp = useCallback81(
|
|
7663
7749
|
async ({ method, token }) => {
|
|
7664
7750
|
const jsonData = {
|
|
7665
7751
|
method,
|
|
@@ -7680,7 +7766,7 @@ function useViewService() {
|
|
|
7680
7766
|
},
|
|
7681
7767
|
[env]
|
|
7682
7768
|
);
|
|
7683
|
-
const requestSetupTotp =
|
|
7769
|
+
const requestSetupTotp = useCallback81(
|
|
7684
7770
|
async ({ method, token }) => {
|
|
7685
7771
|
const jsonData = {
|
|
7686
7772
|
method,
|
|
@@ -7699,7 +7785,7 @@ function useViewService() {
|
|
|
7699
7785
|
},
|
|
7700
7786
|
[env]
|
|
7701
7787
|
);
|
|
7702
|
-
const settingsWebRead2fa =
|
|
7788
|
+
const settingsWebRead2fa = useCallback81(
|
|
7703
7789
|
async ({
|
|
7704
7790
|
method,
|
|
7705
7791
|
model,
|
|
@@ -7727,7 +7813,7 @@ function useViewService() {
|
|
|
7727
7813
|
},
|
|
7728
7814
|
[env]
|
|
7729
7815
|
);
|
|
7730
|
-
const signInSSO =
|
|
7816
|
+
const signInSSO = useCallback81(
|
|
7731
7817
|
async ({
|
|
7732
7818
|
redirect_uri,
|
|
7733
7819
|
state,
|
|
@@ -7759,7 +7845,7 @@ function useViewService() {
|
|
|
7759
7845
|
},
|
|
7760
7846
|
[env]
|
|
7761
7847
|
);
|
|
7762
|
-
const verify2FA =
|
|
7848
|
+
const verify2FA = useCallback81(
|
|
7763
7849
|
({
|
|
7764
7850
|
method,
|
|
7765
7851
|
with_context,
|
|
@@ -7792,7 +7878,7 @@ function useViewService() {
|
|
|
7792
7878
|
},
|
|
7793
7879
|
[env]
|
|
7794
7880
|
);
|
|
7795
|
-
const get2FAMethods =
|
|
7881
|
+
const get2FAMethods = useCallback81(
|
|
7796
7882
|
({ method, with_context }) => {
|
|
7797
7883
|
const jsonData = {
|
|
7798
7884
|
method,
|
|
@@ -7811,7 +7897,7 @@ function useViewService() {
|
|
|
7811
7897
|
},
|
|
7812
7898
|
[env]
|
|
7813
7899
|
);
|
|
7814
|
-
const verifyTotp =
|
|
7900
|
+
const verifyTotp = useCallback81(
|
|
7815
7901
|
({
|
|
7816
7902
|
method,
|
|
7817
7903
|
action_token,
|
|
@@ -7836,7 +7922,7 @@ function useViewService() {
|
|
|
7836
7922
|
},
|
|
7837
7923
|
[env]
|
|
7838
7924
|
);
|
|
7839
|
-
const getNotifications =
|
|
7925
|
+
const getNotifications = useCallback81(
|
|
7840
7926
|
async ({
|
|
7841
7927
|
service,
|
|
7842
7928
|
xNode,
|
|
@@ -7856,7 +7942,7 @@ function useViewService() {
|
|
|
7856
7942
|
},
|
|
7857
7943
|
[env]
|
|
7858
7944
|
);
|
|
7859
|
-
const getCountry =
|
|
7945
|
+
const getCountry = useCallback81(
|
|
7860
7946
|
async ({
|
|
7861
7947
|
service,
|
|
7862
7948
|
xNode,
|
|
@@ -7883,7 +7969,7 @@ function useViewService() {
|
|
|
7883
7969
|
},
|
|
7884
7970
|
[env]
|
|
7885
7971
|
);
|
|
7886
|
-
const getCity =
|
|
7972
|
+
const getCity = useCallback81(
|
|
7887
7973
|
async ({
|
|
7888
7974
|
service,
|
|
7889
7975
|
xNode,
|
|
@@ -7910,7 +7996,7 @@ function useViewService() {
|
|
|
7910
7996
|
},
|
|
7911
7997
|
[env]
|
|
7912
7998
|
);
|
|
7913
|
-
const getWard =
|
|
7999
|
+
const getWard = useCallback81(
|
|
7914
8000
|
async ({
|
|
7915
8001
|
service,
|
|
7916
8002
|
xNode,
|
|
@@ -7935,7 +8021,7 @@ function useViewService() {
|
|
|
7935
8021
|
},
|
|
7936
8022
|
[env]
|
|
7937
8023
|
);
|
|
7938
|
-
const getPartnerTitle =
|
|
8024
|
+
const getPartnerTitle = useCallback81(
|
|
7939
8025
|
async ({
|
|
7940
8026
|
service,
|
|
7941
8027
|
xNode,
|
|
@@ -7987,10 +8073,10 @@ function useViewService() {
|
|
|
7987
8073
|
}
|
|
7988
8074
|
|
|
7989
8075
|
// src/services/dashboard-service/index.ts
|
|
7990
|
-
import { useCallback as
|
|
8076
|
+
import { useCallback as useCallback82 } from "react";
|
|
7991
8077
|
function useDashboardService() {
|
|
7992
8078
|
const { env } = useEnv();
|
|
7993
|
-
const readGroup =
|
|
8079
|
+
const readGroup = useCallback82(
|
|
7994
8080
|
async ({
|
|
7995
8081
|
service,
|
|
7996
8082
|
xNode,
|
|
@@ -8007,7 +8093,7 @@ function useDashboardService() {
|
|
|
8007
8093
|
},
|
|
8008
8094
|
[env]
|
|
8009
8095
|
);
|
|
8010
|
-
const getDataChart =
|
|
8096
|
+
const getDataChart = useCallback82(
|
|
8011
8097
|
async ({
|
|
8012
8098
|
service,
|
|
8013
8099
|
xNode,
|